Java news from this summer's Macworld Expo in New York

Recent conference gave Apple and Mac developers a chance to present products and plans to other Mac developers and Mac faithful -- and provided a good opportunity to examine the state of Java on the Mac

Soon, Apple's Macintosh Runtime for Java (MRJ) will be the only Java virtual machine (JVM) on the Macintosh platform. This puts the responsibility for Java performance on the Mac in Apple's hands. The issues of speed and reliability are being addressed, but Apple remains several releases behind the Solaris and Windows VMs. Support for JDK 1.1.6 is scheduled for the fall. Apple is hoping to support JDK 1.2 three to six months after Sun's final version is posted. Here we examine the recent accomplishments and immediate plans of the MRJ team and present highlights from the panel discussion on the state of Java on the Mac that took place at the recent Macworld Expo in New York.

One VM on the Mac

By the end of the year, Apple's MRJ will be only Java virtual machine (JVM) on the Mac. "Write-once, test-everywhere" didn't just mean developers had to test on each of their target platforms -- they also had to test on each VM on each platform. Metrowerks President and CTO Greg Galanos sees having a single VM on the Mac as a benefit to both developers and customers.

Why were there multiple VMs on the Mac? Over a year ago, Galanos explained that since "there wasn't a VM available on the Mac, we developed one. However, the Java virtual machine is really OS software, and we will support Apple's Java VM for the Mac as soon as they begin shipping in parallel with the Solaris and Windows versions."

The current version of Metrowerks's CodeWarrior Pro will be the last to include the Metrowerks VM. The company plans to use Apple's MRJ in September's CodeWarrior Pro 4 release and subsequent releases.

Microsoft partnered with Metrowerks on its VM. The current version of Microsoft's Internet Explorer (IE) for the Mac allows users to choose between Microsoft's VM and Apple's MRJ. As soon as the MRJ team has worked out a few more details requested by Microsoft, MRJ will be the only option.

MRJ is also working on a plug-in for Netscape's Navigator. Gary Little, Apple's Java product manager, explains that "Navigator 5 (which should beta later this year) will have an 'Open Java Interface' which is a plug-in interface that should allow us to integrate our Java in very nicely."

Partly responsible for causing a stir in the Mac Java community is the coupling of an announcement that there would be a single VM on the Mac with an announcement that Apple and Microsoft would collaborate on Java for the Mac. This caused concern because Microsoft is not supporting all of Java in its Windows implementation. In particular, Microsoft does not support the Java Native Interface (JNI) and Remote Method Invocation (RMI).

Apple's Little stresses that MRJ will support all features in Sun's core Java specification (MRJ 2.0 does support all of the 1.1.x features). The Microsoft collaboration will not affect Apple's support for JNI and RMI. Little explains that much of the Microsoft collaboration will help make MRJ work better inside of Microsoft IE and support its security level. Also, Apple plans to port over some of the features of Microsoft's J/Direct that haven't yet appeared in Apple's JDirect (used to access the toolbox and underlying shared libraries).

Performance on the Mac

The Java implementation on the Mac has traditionally been slow to run and has not supported all the features of implementations on other platforms. In the panel discussion at Macworld Expo, Little explained "the Java reputation on the Mac was originally set by Netscape, which is unfortunate since they do have the slowest Java. MRJ's performance is better than Netscape's, but it's still not where we want it." He added that the Microsoft VM included in IE is faster, but is still not a complete implementation.

A deal to improve performance for MRJ was announced at May's Worldwide Developers Conference (WWDC). Apple has licensed Symantec's just-in-time compiler (JIT). That, together with work the MRJ team has done on improving garbage collection, memory management, and other low-level improvements, has led to a dramatic increase in speed. Little compared CaffeineMarks of 932 for the current MRJ 2.0 to marks of 3107 for the pre-alpha version of MRJ 2.1. Although this number, generated on a 300-MHz G3, is still not as good as the 3898 score earned by the Microsoft VM running on a 400-MHz Pentium II, the scores are finally comparable.

As to the issues of stability and robustness, Apple's Little says that MRJ is still not very good at running very large applications, but that one of the goals of MRJ 2.1 is to support such large applications. In particular, there have been problems with multithreaded programs.

Apple is going to obtain test suites from Microsoft and Sun to test its implementation against more code. The MRJ team has also been very good about seeding its releases fairly early. A year ago there were some issues with Sun about these releases. The easiest way to keep abreast of all of these advance releases is to join the MRJ-Dev newslist (see the MRJ Web page link in Resources).

Apple's current schedule for MRJ

The theme of Steve Jobs's Macworld Expo keynote was that as soon as you answer the public's challenges and meet their expectations, they hit you with new and higher demands. He parodied a theory by Maslow, calling it "Apple's Hierarchy of Skepticism."

When it comes to Apple's MRJ effort, Jobs is exactly right: Apple shows us a threefold increase in speed and we say "Yeah but..." On the other hand, this particular "yeah but" is a longstanding one. When it comes to Java technology, Apple hasn't been known for timely releases.

The lag behind Windows and Solaris releases persists

At last year's Macworld Expo in Boston, Apple's then Java evangelist, Shaan Pruden, said we can look for JDK "1.2 support in early 1998." Apple's Java product manager at the time, Will Iverson, said that the company already had a team working on JDK 1.2. Well, the Windows and Solaris betas of 1.2 were available early last winter, so where's Apple's version?

In March at JavaOne, Gary Little said he had to pull some of the engineers off the 1.2 effort to work on Apple's release of JDK 1.1.6. This is the release Apple has numbered MRJ 2.1. As of now, says Little, "the plan is still to release Apple's version of the VM supporting JDK 1.2 about three to six months after Sun's final release. But our current focus is on 2.1." As MRJ 2.1 moves to beta, Little will shift more engineers back to the JDK 1.2 effort. While "there is no schedule yet" for 1.2 releases, "we do want to keep current with Sun releases as closely as we can," said Little.

So what is scheduled for MRJ releases? MRJ 2.0 is the current version (implementing JDK 1.1.3). It was released in December and is now a part of MacOS 8.1. MRJ 2.1 corresponds to JDK 1.1.6 and should be available by fall (about the time of the release of MacOS 8.5). By early August the alpha of MRJ 2.1 will be released, including Symantec's just-in-time compiler (JIT). The MRJ team is still working to improve the AWT, fix the bugs, and improve performance. Swing/JFC is a standard part of the core 1.2 specification and will be integrated with the 1.2 compliant release of MRJ. Little expects that for this fall's MRJ 2.1 release the Swing software will not be integrated with the standard MRJ 2.1 installation package, but it will be posted separately, probably on the same page as the MRJ Installer.

Making Java on the Mac more "Maclike"

In addition to the performance enhancements described above, the MRJ team is spending some time on the product's look and feel. With OS 8, windows on the Mac got a more three dimensional look, which they call "platinum." Little explains that the "flat look is gone, as MRJ 2.0 supports the platinum look, but it is simulated; 2.1 will use the Appearance Manager for the precise platinum look." Apple's MRJ team may change the default font. Developers who only test on one platform often have text such as button labels that look good on their home platforms and horrible on others. The MRJ team may change the Mac default font from Charcoal to help Java apps and applets developed on a Windows machine look better on a Mac.

Another lingering issue is support for long filenames. Little says the support should be coming and that the capability was actually available with HFS+ but the API wasn't delivered.

Sun is finishing up its end of the new Mac look and feel, which should improve Java on a Mac. But issues remain that will be Apple's job to fix. For example, there has been much discussion about menu bars existing inside of frames and not where Apple users would expect to find them. Fixing this would be a lot of work and Little assumes this job is Apple's responsibility. Also, the bottom of a resizeable window without a horizontal scroll bar often has an undesirable look to accommodate Apple's resize window box. This fix would probably also be left to Apple to take care of.

At JavaOne, Sun Java Evangelist Miko Matsumura demonstrated the Accessibility APIs. These allow sight and hearing impaired individuals easier access to their computers. Although this technology seems right up Apple's alley, it's part of the JDK 1.2 specification and will not appear early. On the other hand, Apple is getting a lot of requests to support drag and drop. This, too, is a part of the 1.2 specification but may be supported by MRJ before the 1.2 release. Sun releases that are 100 percent Java are seldom released in a Mac-friendly format, even though it would be easy for them to do so using Install Anywhere (which they have licensed).

Other requirements for next year include figuring out how best to implement Java under the new MacOS X (see this month's article on the Macworld keynote for more on OS X and Java). There are discussions on what platforms MRJ will support. Little says that MRJ 2.1 will likely support Mac OS 7.6.1 or later, but 68040 systems will not be supported in the future.

To help with these projects, Apple's acting CEO, Steve Jobs, has committed to increasing the support and engineering staffs for MRJ. One visible addition has been Jens Alfke. Prior to joining Apple, Alfke was a frequent contributor to the MRJ-Dev newsgroup as a Sun employee.

"The State of Java on the Macintosh": A panel discussion

In the Macworld Expo program notes, moderator Dori Smith's description of the panel "The State of Java on the Macintosh" was overly optimistic, saying that the Mac is "not only an equal to other platforms as a client but a great choice for a Java developer." She promised panelists from Apple, Sun, Microsoft, and other companies would "give you tips and strategies for getting the most out of Java on the Mac." The only accurate aspect of her description was Gary Little's presence on the panel. Eric Thauvin, product development manager from Blueworld, and Elliotte Rusty Harold, Java book author, were the other panelists.

Smith's introduction to the panel discussion was as cautious as the written description was optimistic. It contained the same tired criticisms and observations (some outdated) of Java in general. The moderator's lack of a clear vision in her intro led to a panel discussion that had no clear focus.

Little began with his overview of the state of Java on the Mac. Much of the information presented above is a combination of the materials he presented and JavaWorld's conversations with him earlier in the week.

Blueworld's Thauvin was the moderate voice on the panel. He explained Blueworld's decision to use Java in the company's Lasso application for creating front ends to databases such as Filemaker Pro. Lasso 3.0 works on both Windows and Mac platforms and lets users create their own plug-in modules -- the need for cross-platform capabilities led Blueworld to consider using Java.

In developing Lasso 3.0, Thauvin initially was concerned that a Java solution "would be slow, it's not going to work, it's not going to be compatible." Eventually, however, he reasoned that "this is a server product on the server side; it's not going to be a requirement for people accessing your Web site to have Java." As for the issue of performance, Thauvin was concerned about Java being slow on the Mac. "But that wasn't really an issue," he found, "because when your server starts it will load all of the Java plug-ins into memory, and it's going to be just as fast as a C++ solution." Thauvin concluded that, as far as he was concerned, "the state of Java on the server side on the Mac is great."

Java on the Mac: To develop or not to develop?

The question Harold said he would address in his presentation is whether you can, and should, do Java development on the Mac. His conclusion was grim: "Although you certainly can develop Java software on the Mac, I think you're going to be happier, more productive, and more successful if you use a PC." He explained that as an author he had found it very difficult writing his books using Java on the Mac.

1 2 Page 1
Page 1 of 2