Download PDF version of this article PDF

Java Is Jumpin’, This Time for Real
Alexander Wolfe, Science Writer

There’s perception, and then there’s reality. Even though the frenzied hype over Java has died down since the Internet bubble burst, Java is becoming hugely popular in the wireless space. Several events highlight its emergence. Most recently, in December, Texas Instruments opened a research operation in France to focus on the integration of Java apps into the next generation of wireless devices.1

And throughout 2003, Java originator Sun Microsystems made some serious moves aimed at expanding the technology’s horizons. Meanwhile, in the developer community, open source efforts and the applications needs of handset manufacturers are spurring grassroots projects.

Indeed, after several years of Java doldrums, 2003 marked a year where Sun gained some serious technological traction for Java on mobile phones and PDAs (personal digital assistants). For developers, this translates into the availability of heavier-duty tools for building Java-based wireless apps.

The premiere Java tool for developing apps for downsized devices is J2ME (Java 2 Platform Micro Edition). J2ME is billed as a set of tools and an optimized, open Java runtime environment, complete with the emulation environments, documentation, and examples needed to develop Java apps targeted at consumer wireless devices, ranging from phones and PDAs to smart cards and set-top boxes.

Developers can download the version 2.1 beta release of the toolkit free from Sun at J2ME arrives as a wrapper filled with an alphabet soup of profiles and APIs (application programming interfaces). The package contains tools such as MIDP 2.0 (Mobile Information Device Profile), a new specification/API that supports the core functions required by mobile applications, including the user interface, network connectivity, and local storage. The second key profile in J2ME is the CLDC (Connected Limited Device Configuration), which handles the intermittent connectivity requirements of cellphones. Also in the J2ME mix are profiles such as J2ME Web services, Mobile Media APIs version 1.1, and the Wireless Messaging API.

An odd twist—or perhaps a recognition of reality on the part of Sun—is the fact that the officially supported platforms on which J2ME runs are Windows XP and Windows 2000. J2ME will run on Linux and Sun’s own Solaris, but it’s not “officially supported” on those Unix clones. (This bifurcates the wireless development/target platform equation; the Symbian operating system, used by Nokia, is the most popular handset operating system, while Microsoft’s Smartphone systems software2 is a market also-ran. So, paradoxically, cellphone developers may end up creating code for Symbian handset targets on Microsoft PCs.)

Practically speaking, the key to writing apps that are portable across heterogeneous handsets is to write your Java code in the form of a MIDlet. That’s the name applied to mobile Java applications that are created with the J2ME toolkit and that conform to the MIDP 2.0 profile. A MIDlet will run on any device that implements MIDP; this goes beyond just cellphones to encompass handheld computers and hybrids. Importantly, unlike standard Symbian phone apps, MIDlets are “sandboxed”—that is, their memory usage is isolated to prevent contamination by malicious virus code.

(In the real world, portability isn’t yet quite as universal as promised. The idiosyncracies of the not-yet-standardized, resource-constrained cellphone platform—not to mention the variations in user interfaces tailored for tiny screens—mean tweaking is usually required. Nevertheless, copying your MIDlet files to another platform is a starting point that sets you more than halfway on the road to completing any port.)

The MIDlet emulator supplied with the toolkit is perhaps its centerpiece and is the key to testing programs before they’re deployed to the target handset. (Typically, third parties such as Nokia offer separate utilities to handle downloading the executable to their respective handsets.) I’ve found that coding those apps—which is pretty much a pedestrian process of loading up your module with calls and passing parameters to Java classes that access required functionality—entails what’s largely a trial-and-error learning curve. To speed skills acquisition, there are several useful app notes that explain how to write your first app and run it in an emulator. Sun offers one at Nokia provides an excellent overview of Java on mobile devices, along with an example and source code of how to create a MIDlet application, at


In the broader software world, wireless Java is evolving very much as a grass-roots political campaign. Consider the recent formation of the community, a loose, collaborative collection of mostly open source projects (see Programmers of all stripes have been signing on and posting requests for people to join their proposed efforts.

The nexus of wireless-tools interest at is in the “Java for Communications” sub-community ( This site touts the availability of Java components for the construction of VoIP (voice over IP) apps, IM (instant messaging) libraries, and other mobile/wireless utilities.

The chief project in that orbit is CellphoneJava (, a nifty collection of applets and components. Also of interest is SIP (session initiation protocol) Communicator, a client with media and IM capabilities that supports audio/video sessions over IPv4 and IPv6 (Internet Protocol versions 4 and 6).

On the corporate front, Sun and Oracle have banded together in a bid to co-op the community banner.3 They’ve formed the Java Tools Community,4 a group that seeks to enlist tool vendors to create an alternative framework to Microsoft’s .NET5 and Visual Studio integrated development environments. Borland, IBM, SAP, and SAS have also joined in a bid to add tools that will support Web services.


For their part, the handset vendors have the most active developer-support operations, particularly in the form of online forums where developers can pepper their peers with questions relating to specific handsets. As might be expected from the largest handset vendor, Nokia’s forums ( see heavy traffic.

For smaller vendors like Sendo, the stakes may be higher. The European handset manufacturer, which bolted out of Microsoft’s Smartphone camp last year to embrace Symbian and Java, has mounted a major push to convince third-party developers to create apps that will put its phones on the map. Sendo offers tools and tips to developers who register for free at its site at

Although writing J2ME apps for individual handsets is the first step in the wireless programming progression, it may no longer be the most important step. Now, connecting J2ME-enabled devices to back-end services is taking on increasing importance because cellphone apps no longer exist in isolation.

To that end, Sun earlier this year announced plans to “launch an end-to-end mobile enterprise development platform to help service providers and enterprises quickly extend their current IT investments into 2.5 and 3G wireless networks.”4

As part of the push, Sun is reenergizing its efforts to promulgate Jini, the network-connectivity software technology that’s able to pick wireless clients out of the ether and connect them to back-end servers.

Jini, unveiled in January 1999, has been positioned as a platform-independent Web “dialtone,” which enables users to connect any roaming consumer smart device into a company’s network from anywhere. In hyping the technology at its launch, Sun raised expectations that Jini-compliant smart devices would soon see widespread deployment.

That never happened. Jini has made slow but steady progress in the developer community, however. By making it easier for programmers to fold Jini connection capacity into cellphones and PDAs, Sun is hoping a new crop of Jini developer kits may spark a critical mass of further developer adoption.

Developers can download Sun’s Jini technology kit version 2.0 at V2.0 implements a new Jini security model, supports version 2 of the Jini discovery protocols, and has a new remote-methods invocation programming model with customizing APIs for each layer of the protocol stack.

Finally, Sun has been expanding its wireless-Java hardware horizons beyond cellphones to embrace the Intel embedded processors that are increasingly seeing service in non-cellphone devices such as handheld computers and MP3 players.

The move has involved adding to J2ME support for Intel’s XScale processors. Sun spun an optimized version of its HotSpot just-in-time Java compiler, targeted at XScale and called it CLDC HotSpot (after the CLDC profile in J2ME). Upon closer inspection, CLDC HotSpot seems to be an updated implementation of Sun’s old-line embedded Java KVM (K virtual machine). Nevertheless, this is an important move in broadening Java’s applicability, in no small measure because it’s a free tool for an Intel target. (There’s a useful white paper on CLDC HotSpot at


1. Walko, J. TI, INRIA collaborate on Java competence center in France. EE Times, (Dec. 4, 2003);

2. Wolfe, A. Microsoft’s compact framework targets smart devices,” ACM Queue (Oct. 2003), 10–12.

3. Taft, D. K. Java tool vendors unite in battle against .NET. EWeek, (Nov. 24, 2003);,4149,1394340,00.asp.

4. See reference 2.

5. See reference 3.

6. Sun press release. Sun Microsystems launches new products and programs to unite wireless java community and accelerate the deployment of mobile data services. (June 10, 2003);

ALEXANDER WOLFE received his electrical engineering degree from Cooper Union in New York City. A science writer based in Forest Hills, New York, he has contributed to IEEE Spectrum, EE Times, Embedded Systems Programming, and



Java 2 Platform Micro Edition

Version 2.1 beta release of the toolkit (free download)

Useful App Notes

About writing your first app and sending it through an emulator

Jini Technology Kit v2.0

Download Jini network technology

CLDC HotSpot

Useful white paper about free tool


Developer/Support forum

Provided by largest handset vendor


Recently formed, loose, collaborative collection of mostly open source projects

Java for Communications Sub-community

Nexus of wireless-tools interest at


Chief project


Sendo offers tools and tips to developers who register for free at its site


Originally published in Queue vol. 1, no. 10
Comment on this article in the ACM Digital Library

More related articles:

Matt Godbolt - Optimizations in C++ Compilers
There’s a tradeoff to be made in giving the compiler more information: it can make compilation slower. Technologies such as link time optimization can give you the best of both worlds. Optimizations in compilers continue to improve, and upcoming improvements in indirect calls and virtual function dispatch might soon lead to even faster polymorphism.

Ulan Degenbaev, Michael Lippautz, Hannes Payer - Garbage Collection as a Joint Venture
Cross-component tracing is a way to solve the problem of reference cycles across component boundaries. This problem appears as soon as components can form arbitrary object graphs with nontrivial ownership across API boundaries. An incremental version of CCT is implemented in V8 and Blink, enabling effective and efficient reclamation of memory in a safe manner.

David Chisnall - C Is Not a Low-level Language
In the wake of the recent Meltdown and Spectre vulnerabilities, it’s worth spending some time looking at root causes. Both of these vulnerabilities involved processors speculatively executing instructions past some kind of access check and allowing the attacker to observe the results via a side channel. The features that led to these vulnerabilities, along with several others, were added to let C programmers continue to believe they were programming in a low-level language, when this hasn’t been the case for decades.

Tobias Lauinger, Abdelberi Chaabane, Christo Wilson - Thou Shalt Not Depend on Me
Most websites use JavaScript libraries, and many of them are known to be vulnerable. Understanding the scope of the problem, and the many unexpected ways that libraries are included, are only the first steps toward improving the situation. The goal here is that the information included in this article will help inform better tooling, development practices, and educational efforts for the community.

© ACM, Inc. All Rights Reserved.