This release marks a break with tradition for Mac OS X and Java. In previous releases there could only be one version of Java installed on the system. Developers only needed to be concerned with a single Java version for a particular version of Mac OS X. With the Java 1.4.1release, there is the possibility that users will have two different versions of Java on their system. As a developer you need to take this into account for both future development and support of existing Java applications.
Note that there are only two versions of Java when a user has explicitly installed Java 1.4.1. If a user has not explicitly installed Java 1.4.1, they will have only Java 1.3.1, and any 1.4.1-specific code will not work. They can download Java 1.4.1through Software Update or from http://www.apple.com/downloads/macosx/. As a developer, there are many ways you can determine whether Java 1.4.1 is installed, System.getProperty("java.vm.version") and java -version probably being the simplest. A user shouldn’t have to resort to the command line. Instead they can just use the Finder to look in /Library/Receipts for an item named Java1.4.1.pkg.
The following sections discuss pertinent details you should be aware of to make sure that you are using the correct version of Java for your application. Since there are various ways in which you can deploy Java applications on Mac OS X, the sections are broken down based on your deployment vehicle.The following information applies only if the computer your application is being run on has both Java 1.4.1and Java 1.3.1 installed.
Note: If you are developing WebObjects applications, see the AppleCare Knowledge Base article number 75505 for WebObjects–specific information relevent to using Java 1.3.1 with Java 1.4.1 installed. You can access this information from http://www.info.apple.com/.
Java Applications as Mac OS X Application Bundles
Java Web Start Applications
Double-clickable JAR Files
Command Line Applications
Java Applets
Native Applications That Invoke Java Through JNI
Last updated: 2003-06-11