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 and more is the very technology at the center of an intense battle between Microsoft Corp. and Sun Microsystems Inc. over control of desktop computers. Though Sun has mostly lost that fight, the beleaguered Silicon Valley icon is trying to give new life to its Java programming language with an aggressive push into mobile devices. Once again, it finds a foe in Microsoft. But this time Sun has the lead.