JavaOne attendees spent the third week of June in San Francisco, learning, hacking, and networking -- though not necessarily in that order. One announcement that was emphasized by Sun was J2ME, short for the Java 2 Platform, Micro Edition. Actually, J2ME wasn't merely announced -- it was available to attendees, if they plunked down a bit more money than the regular conference fees and bought a Palm V organizer at the show. And that, as they say, is where the story begins ...
'Welcome, my friends, to the show that never ends' -- Emerson, Lake, and Palmer
Whew, four days, three nights, and not a lot of sleep. If you haven't read any of my columns in JavaWorld, allow me to introduce myself: I'm Chuck McManis, a writer, a programmer, and all-around Java kinda guy. And since I live in the San Francisco Bay Area and have a particular fondness for Java -- seeing as I was working in the group at Sun that created it -- I try to get to the JavaOne conference every year, if possible. That gets more difficult as the price goes up, but the experience keeps justifying the effort needed to get there. This year, the conference, quite frankly, exceeded my expectations.
1999's JavaOne started, as all of the others have, with a very long line outside the Moscone Center in downtown San Francisco. This line, depressingly enough, extended outside even though it was for people like myself, who already had our badges and were just waiting to pick up the various knickknacks that come along with attendance at a JavaOne conference. Last year we got an iButton with Java from Dallas Semiconductor (see the April 1998 JavaWorld article "Ring fever" for details); this year there was no such luck.
After picking up my badge holder, I noticed that the line to pick up materials stretched out the door and down the street, but that there was a line marked with a sign that read "Materials and Purchase Palm V" that didn't even leave the building. So, like any good engineer, I wandered over to that line and asked, "How much are they selling the Palm Pilots for?" The answer was more than low enough to convince me to join the shorter queue.
'I'm going to call it simply, "Dinner with important client."' -- Unidentified attendee in line to buy a Palm V
Yes, my friends, we chose to stand in that line not just because the Palm V was cool (it was, of course) but because we knew we could get through it faster than we could get through the one outside. Most of us really did want to hear the keynote that morning, and it had become clear that even those of us who had arrived an hour early hadn't allowed enough time to navigate this conference's lines! While we waited, we discussed ways in which we could add the cost of the Palm V to our expense reports and get it past the eagle eyes of accounting. We patiently, and when we got to the front of the line, we opened up our wallets, picked up our stuff, and hurried off to the opening keynote address.
'We see J2ME shipping in millions of devices by the end of this year.' -- Alan Baratz, President, Sun's Java Software Division
At the keynote address, the crowd was treated to the standard Sun production -- lots of lights and flash, and of course plenty of gizmos and cool things. One of the announcements was that Java had packaged up the KVM (the K virtual machine) and some classes and was calling the whole thing the Java 2 Platform, Micro Edition, or J2ME. (This would have been a much more clever name if we were on version 4 of Java.)
So what exactly was J2ME? It appeared to be a solution to what many perceived as the complete failure of the PersonalJava platform. However, while it may serve that purpose as well, what was really interesting was that it was the outgrowth of a project inside Sun Labs to create a very small version of Java that could run on embedded devices. Whereas PersonalJava was considered by many a failure, Java Card -- the Java specification for smart cards -- was considered by just as many to be a success. (See Zhiqun Chen's article on Java Card in last month's issue of JavaWorld.) The difference, perhaps, was that Java Card was the solution to the problem of programming smart cards, whereas PersonalJava was a product in search of a problem. J2ME is a solution to another problem: "Does it make sense to put Java on my pager, and if so, what does it get me?" To find the origins of this question -- and its answer -- let's step back in time a moment to the early days of the Java platform.
'I can imagine a time when even the light switches in your house run Oak.' -- James Gosling, while at First Person
Java is, for many, a wonderful language in which to write code. When I joined First Person (which was the wholly owned subsidiary of Sun that was formed out of project Green and which begat Java), I interviewed with, among other people, Tom Lyon. Tom showed me a prototype called the *7 ("star-seven"). This was a small, handheld device running Java (called Oak at the time) with a very creative user interface: an animated agent named Duke ran around in Oak-land (bad pun, I know) and helped you out with your day-to-day activities. The theory was that Oak was going to run on everything. And with Oak running on everything, you would not, for instance, have to buy a new remote with your fancy new television; instead, the television would send any Oak-enabled device the classes needed to control it, and poof! You'd have an instant TV remote.
As it turns out, Oak eventually became targeted for Web browsers, which had few memory constraints. One of the problems with this development was that it eliminated the restrictions on the amount of memory needed to run Java (as Oak eventually became known); its footprint got bigger and bigger. When Java was released in March 1995, it wouldn't have fit on any handheld device of the day, only on high-end laptop computers. For most developers, that state of affairs did not change significantly until last month.
'When you HotSync your Palm you will get the latest KVM.' -- John Gage, Sun Microsystems
I don't know how many people responded the same way I did when I heard John's statement, but my reaction was to reach into my backpack and rip open the shrinkwrap on the Palm V.
Normally, when you buy a Palm V at a store, the rechargable batteries are pretty close to being dead. In my case the battery was about three-quarters full. That was wonderful, but the even more exciting part was seeing Duke, hand up in a wave, over the icon title, KJava. Whoa! was my reaction. Poke here and there and, yup, there appeared to be a virtual machine in my Palm (pun intended). Just under seven years after I had interviewed for the position in the Java group, I was once again holding a portable digital assistant (PDA) that was capable of running Java -- at least in the form of J2ME.
'This one doesn't work, try that one.' -- Nearly everyone at JavaOne with a Palm V
When the keynote let out that first morning of JavaOne '99, it seemed as if everyone rushed over to the HotSync stations in order to get the latest KVM (or ran to get in line to buy a Palm V). There were problems, of course, most of which stemmed from a lot of Palm newbies such as myself having no idea what the heck we were supposed to do. Eventually the magic incantations were communicated -- "Uncheck that option, enter this DNS server address, change that preference" -- and then we got the synchronization display that took several minutes to complete.
Once the HotSync was finished, we all had the newest Java on our Palms. Suddenly, it seemed like a very good idea indeed to have bought the Palm earlier in the day. Those who had waited now faced a line to buy Palms that had started extending out of the door and down the street. Rumor had it that 10,000 units were sold during the conference. Yikes!
'This is really cool, but, frankly, I can't think of what to do with it.' -- Anonymous Lockheed Engineer
The question of utility came up a lot during the conference. Is it useful to have a PDA that runs Java? Is it useful to have a pager that runs Java? I certainly think it is, and I'll try to explain why.
I owned a Newton Message Pad when the first update came out (the Message Pad 110). I chortled over its interpretation of my writing, I laboriously filled in many names and addresses, and I sketched a few things. Then I wanted to modify its software. I searched high and low for a software kit that didn't require me to throw out everything I knew and learn a new language, and had the expressiveness to create new applications as well. Slowly, eventually, the Newton Software Development Kit got better and better, but the unit just didn't cut it. I was ready to buy a Newton 2000, but the company went away. I sold my Message Pad to a collector.
Then I bought a Wizard 9600. It had some things that I really liked, including a keyboard, but the screen was unreadable in nonoptimal conditions. And while, with its built-in applications, it came closer to what I needed, it fell short in significant areas: no way to add a new database, and no way to create an interface to one that would let me use the PDA as a portable reference stack. As for speed, it was almost fast enough to be usable.
The issue with these PDAs is that they never do exactly what you want them to do. They do what the engineers who designed them like, but that may or may not be what you like. Further, up until the appearance of the Palm Pilot, the ability to customize these PDAs was very limited without the inclusion of an expensive development kit and the payment of occasional licensing fees.
J2ME solves the customizability issue by putting a layer of Java (the KVM) between the developer and the platform. Further, this version of Java can be quite small because as few as two dozen base classes are required to be compatible with the definition. Thus, you can put the KVM on a device that uses a two-line liquid crystal display for output and two buttons for input, or on a device with a graphic LCD screen that uses a pen for input.
The Palm V brings a sleek package, a network connection, and a graphic interface to the party. J2ME supplies the glue that can link these in new and interesting ways. The ideas come from the developers, of course, and by broadening the pool of potential developers to also include the Java developer community, the number of ideas that will get implemented will grow immensely.
My current favorite idea for what one could build on this device is a baseball scoring sheet. You see, baseball fans are obsessed with statistics. And they each have a different system, spending their time at a game noting each event, hit, strike, wild pitch, and so on, as it occurs. Before now, the chance that an application could be developed that satisfied this niche market was small. But with J2ME's access to a wide population of Java programmers, some of whom are baseball fans, can such an application be far behind? I don't think so.
Learn more about this topic
- The Java 2 Micro Edition home page
- Developing on the Palm platform
- Article on J2ME
- See Mariva Aviram's report on the Palm V at JavaOne
- Bill Day, JavaWorld columnist, has written "Java device developments at the 1999 JavaOne Developer Conference," for the online show daily JavaOne Today: http://www.javaworld.com/javaworld/javaone99/j1-99-j2me.html
- Chuck McManis's article from last year's show reported on the Java rings that Sun gave away to JavaOne attendees. See "Ring feverA first-hand look at Java-powered jewelry:" http://www.javaworld.com/jw-04-1998/jw-04-ringfever.html