The Source for Java Technology Collaboration


-- Main.robertmacgregor - 10 Jun 2005

Follow these steps to modify projects for use with J2SE 5.0:

Target Settings: Double click the target to edit and provide /System/Library/ Frameworks/JavaVM.framework/Versions/1.5/Commands/javac as the value for the JAVA_COMPILER build setting. Change the Target VM Version and Source Version in the Java Compiler Setting to use 1.5.

Executable Settings: Double click the executable named java and enter /System/Library/ Frameworks/JavaVM.framework/Versions/1.5/Commands/java as the Executable Path in the General tab of Executable info.

Applet Development: Double click the executable named appletviewer and enter /System/ Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/ appletviewer as the Executable Path in the General tab of Executable info.


For developers using the command line simply define your JAVA_HOME environment var as needed and call the correct java tools (consider modifying your path for that).

Normally JAVA_HOME points at /Library/Java/Home which is a link to the 1.4.2 home directory listed below. You could redirect it as needed to one of the following (on Tiger).

/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Home /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home

I leave the use of correct java commands to the reader but consider simply prepending to your path the bin directory from the home directory (or Commands one level up) of the JVM you want to use.

You could set all this up as a simple shell script, function or alias.

(Contributed by Shawn Erickson to Apple's java-dev mail-list)


Do not change the symbolic link for the CurrentJDK folder from 1.4 to 1.5. This can break future updates from Apple. The recommended way is described above by Shawn Erickson. (NilsKassube)

Rob MacGregor

Topic HowDoISwitchToJava15 . { Edit | Ref-By | Printable | Diffs r3 < r2 < r1 | More }
 XML java.net RSS

  

Revision r3 - 2005-07-11 - 19:21:59 - nils_kassube
Parents: WebHome > MacJavaProjects > MacJavaFaq