Macworld week is a good time to seek out connections between Java and Macintosh. Over at O'Reilly Net's Mac DevCenter, Daniel Steinberg's column presents examples for Java developers looking for cross-platform solutions as well as those who want to write Mac OS X-specific applications in Java.
Even though Sun was a no-show, the Macworld conference held at San Francisco's Moscone Convention Center did have some Java coverage. Apple, however, could not comment on most questions related to its future Java strategy and there were no significant announcements about Java for the Mac.
Many of my friends and I use some kind of Apple Mac for our work, whether they're portables, desktop or server systems. When we're asked why, our response tends to be something like "the machines are way cool, and they run Java better."
Apple has just released Java 2 Standard Edition (J2SE) 1.4.1 for Mac OS X. Mac OS X has shipped with J2SE 1.3.1 installed from the beginning. Now J2SE 1.4.1 is available to all Jaguar (Mac OS X version 10.2) owners by using the software update at Apple's Java product page. Much of the time porting J2SE 1.4.1 to the Mac has been spent moving the GUI elements from the Carbon framework to the Cocoa framework. This means it is easier for your Java applications to take advantage of Mac OS X specific features when running on the platform and to look and feel more like native applications.
In this article, I lay out everything you need to know about the Java classpath (and the associated sourcepath) on UNIX, Linux, and Mac OS X. In the companion article, I demonstrate similar techniques for Windows. Following the procedures outlined here will serve as a guide along the way, and should cure most classpath problems.
The next issue to consider when fine-tuning a Java application for Aqua is the menu bar. Aqua has a single menu bar that always appears at the top of the screen. It is shared between the applications and the system. On most other operating systems, individual windows have their own menus. You see the difference when you compare figure 1, a Windows screenshot, with figure 2, the Mac OS equivalent.
You might have been tempted by Apple ads on switching to Macintosh (www.apple.com/switch/ads). I was tempted enough to add two Macs to my network. I bought them primarily for digital photography, but I was also interested in the new, UNIX-based, Mac OS X.