The current JDK and JRE after installing J2SE 5.0 Release 1
Java 1.4.2 remains the current JDK and JRE after installing J2SE 5.0 Release 1.
This allows applications built for Java 1.4.2 to continue running in Java 1.4.2.
To use the J2SE 5.0 version of any command-line Java utility,
such as java or javac, specify
the full path to the J2SE 5.0 version of the command. This usually
means prepending the command with the path /System/Library/Frameworks/JavaVM.framework/Versions/1.5/.
The JVMVersion Info.plist
key allows you to specify which JVM your application uses. Using
either the 1.3+, 1.4+, or 1.5+ keys results in the VM being used
according to a precedence list set in the Java Application Settings
portion of the Java Preferences application, found in /Applications/Utilities/Java/J2SE
5.0. By default in J2SE 5.0 Release 1, the
precedence list follows this order:
J2SE 1.4.2 |
J2SE 5.0 |
Though not listed, Java 1.3.1 is considered to be the last entry on the list.
This works by trying to match the given key versus VM versions in the list:
Having 1.4+ specified first matches the “J2SE 1.4.2” value, so that is the VM used. Specifying 1.5+ means that 1.4.2 is skipped and the next choice, “J2SE 5.0,” is used.
If a user switches these values so that “J2SE 5.0” is first, an application that specifies 1.4+ runs in J2SE 5.0, since it’s the first entry and numerically superior to J2SE 1.4.2.
Table 1-1 lists the possible combinations of values when working
with JVMVersion values
and the Java Version Precedence List found in Java Preferences.
Possible JVMVersion Value |
VM used if “J2SE 1.4.2” is listed first in Java Version Precedence List (Default) |
VM used if “J2SE 5.0” is listed first in Java Version Precedence List |
|---|---|---|
|
J2SE 5.0 |
J2SE 5.0 |
|
J2SE 5.0 |
J2SE 5.0 |
|
J2SE 1.4.2 |
J2SE 5.0 |
|
J2SE 1.4.2 |
J2SE 1.4.2 |
|
J2SE 1.4.2 |
J2SE 5.0 |
|
Java 1.3.1 |
Java 1.3.1 |
You can specify a specific version of Java as your JVMVersion key
(such as 1.4.2 or 1.5.0),
but if that precise version is not installed on the system, your
application will fail to launch. This is not recommended.
To use an applet in Safari using J2SE 5.0, use the Applet
portion of the Java Preferences application, found in /Applications/Utilities/Java/J2SE
5.0, to select J2SE 5.0 as the virtual machine
for applets.
For information on configuring Xcode projects for use with J2SE 5.0, read “Radar #4090917.”
Last updated: 2005-10-04