The latest cell phones can show you the nearest bathrooms in San Francisco or which subway to take in London. They can also help with your diet by tracking calorie intake.
Behind such programs is a computer language called Java, a technology that has been at the center of an intense battle between Sun Microsystems Inc., the Santa Clara, Calif.-based company that owns Java, and Microsoft Corp.
Though Sun largely has lost the fight for control over desktop computers to Microsoft, the company is trying to give new life to Java with an aggressive push into mobile devices.
Once again, it finds a foe in Microsoft. But this time Sun has the lead.
Sun, which distributes Java for free and sells computers to power Java services, says more than 94 million Java devices are in use.
In the world of cell phones, what began as a novelty in Japan has garnered interest in Europe and North America, with 53 wireless carriers embracing Java, up from 35 last year, according to Sun. Java is also appearing in cars, printers and camcorders.
Java was born in 1990 as Oak, a way to standardize programming across multiple devices. It was renamed in 1995, just as the Internet was taking off, and its focus shifted to breaking Microsoft's dominance on desktops.
The idea behind Java is simple: Write a program once and it runs anywhere, regardless of the operating system. A game or a word processor that works on Windows should also run on Macintosh, Linux and others.
In practice, however, early versions of Java suffered performance problems, while Microsoft strengthened its grip on desktops.
As a result, Sun is increasingly positioning Java toward wireless devices. Developers could write programs for customers to download onto their phones without worrying about compatibility, Sun said.
But Java hasn't won the wireless device wars, and work remains on developing standards for features such as ring tones.
Microsoft, meanwhile, is aggressively pushing its Java alternative for small devices -- called .NET Compact Framework.
"Java absolutely had a head start on us," said Ed Kaim, a Microsoft product manager. "But it's not a sprint, it's a marathon."