Apple releases MacOS Runtime for Java (MRJ) version 2.0

After a long wait, Macintosh users have the virtual machine and libraries that support the Java 1.1 spec

You can now download the long-awaited MacOS Runtime for Java (MRJ) version 2.0. Apple's numbering system for its releases differs from Sun's, but this release of the MacOS implementation of the Java virtual machine (JVM) and related libraries corresponds to version 1.1.3 of Sun's Java specification. The release also includes versions of the just-in-time compiler (JIT) for both the PowerPC and for 68040 Macs. See the Resources section for a link to the announcement of the release; the release page contains links to download sites.

On the download page, Apple recommends "that everyone download and install this version immediately to gain the advantages provided by all the latest Java features it incorporates." Despite the importance of this release, Apple does not plan to include this news in a formal press release until January 6, and currently its "hot news" page suggests that you upgrade to the now-outdated MRJ 1.5.1.

At MacWorld Expo in Boston last August, Apple promised to make MRJ 2.0 available in public beta by the end of September. Instead, Apple provided a series of seven early access releases to developers as the product moved from alpha to beta. The final version was released on December 20, shortly after Sun released beta versions of the Java Development Kit (JDK) 1.2 for Windows 95/NT and Solaris. Apple still plans to close the gap between the Sun JDK release and the corresponding Apple MRJ release. The company already has people working on 1.2.

With MRJ 2.0, the MacOS VM supports JavaBeans, the JAR file format, Remote Method Invocation (RMI), Java Database Connectivity (JDBC), and Java Native Interface (JNI). Other supported features mean more to developers than to the average user: There is support for inner classes, the new event model, changes to the abstract window toolkit (AWT), object serialization, and reflection.

The corresponding Software Development Kit (SDK) is not quite ready yet. As with MRJ, the SDK is being released to developers as it evolves. Apple's Java product manager Gary Little says that Apple "should be posting an MRJ 2.0 SDK (final) by the end of January." This basically will be the MacOS version of the Java Development Kit (JDK) that Sun had originally promised for release last June. JDK1.1. The final release of JDK 1.1 for Windows was in February '97. In May, Andrew Shikiar, of Sun's JavaSoft division, told JavaWorld that "the beta release of the JDK for the Mac...will be announced over the next few weeks" and "the final release of the JDK 1.1 for the Mac will be early this fall." As it turns out, this MacOS release trails the corresponding Windows release by approximately a year.

As Little points out, there are enhancements for Mac developers in MRJ 2.0. "JManager is an interface for browsers and applet runners, JBindery helps to create double-clickable applications, the MRJToolkit libraries will provide easy access to common system routines, and JDirect will give convenient access to the toolbox."

Not everything will port smoothly to the MacOS. Zero G software has experience with Java on many platforms and has been working with MRJ 2.0 for several months. Its product "InstallAnywhere" is a developer tool that creates universal installers that run on any Java-enabled platform and tailors the installation to the user's system. Zero G's director, Eric Shapiro says that there is a problem with long file names. For file names longer than 31 characters you need a workaround. Shapiro suggests that, on an OS that supports longer names, you create a new uncompressed zip file stored with relative paths, for example, using PKZIP. Now you can copy the zipped file to your Mac. Although this process is not as difficult as it sounds, it also involved a second non-MacOS machine.

All in all, this release is welcome news for fans of Java on the Mac. It means that MacOS users are up-to-date with regards to running Java applications and applets. Developers who want to work on the MacOS still don't have the access that Solaris and Windows 95/NT developers have to the cutting-edge offerings from Sun.

Daniel Steinberg is a visiting assistant professor of mathematics at Oberlin College. He learned to program in C (by reading Kernigan and Richie, and asking friends) and C++ on a Macintosh to help his research on elastic curves in hyperbolic space. Object-oriented design is the way mathematicians view the world and so programming in Java was an obvious next step. Daniel taught an introductory course in Java at John Carroll University last spring and spent the summer preparing for fatherhood.

Learn more about this topic

  • The announcement of the release and links to download sites
  • For a story on the lag-time problem with Mac Java development, see Daniel Steinberg's article in JavaWorld's July issue"Java development on Macintosh -- is it viable or not?"

This story, "Apple releases MacOS Runtime for Java (MRJ) version 2.0" was originally published by JavaWorld.


Copyright © 1998 IDG Communications, Inc.

How to choose a low-code development platform