Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Java Versioning

Radar #4030615

The current JDK and JRE after installing J2SE 5.0 Release 1

Description:

Java 1.4.2 remains the current JDK and JRE after installing J2SE 5.0 Release 1.

Resolution:

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:

Table 1-1 lists the possible combinations of values when working with JVMVersion values and the Java Version Precedence List found in Java Preferences.

Table 1-1  Java VM behavior, based on the JVMVersion key and the Java Version Precedence List 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

1.5+ (5.0 or “higher”)

J2SE 5.0

J2SE 5.0

1.5* (newest 5.0)

J2SE 5.0

J2SE 5.0

1.4+ (1.4 or “higher”)

J2SE 1.4.2

J2SE 5.0

1.4* (newest 1.4)

J2SE 1.4.2

J2SE 1.4.2

1.3+ (1.3 or “higher”)

J2SE 1.4.2

J2SE 5.0

1.3* (newest 1.3)

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.”



< Previous PageNext Page > Hide TOC


Last updated: 2005-10-04




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice