Change default leopard java jdk 1.5 to 1.6 the easy way

The first go around with this I had a hell of a time. Most posts said to change default jdk in java preference app but that didn’t work and changing symbilic links in java home showed correct 1.6 version when running “java -version” in terminal but my java app (in this case the wonderful open source coldfsuion engine Railo) was still reporting 1.5 jdk.

Anyways…. I’ll cut to it and here’s the steps.

Open upĀ  /Applications/Utilitites/Java Preferences.app

Then drag n drop the Java SE 6 listing to the top of each box

Then close

then open up terminal and go into the java frameworks versions directory:

cd /System/Library/Frameworks/JavaVM.framework/Versions

Then enter this in terminal to switch symbolic link to current jdk

sudo mv CurrentJDK CurrentJDK.orig

then in terminal type

java -version

and you should see something like this (with 1.6 in it)

java version “1.6.0_13”
Java(TM) SE Runtime Environment (build 1.6.0_13-b03-211)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02-83, mixed mode)

DONE!

READ  Algorithm {Binary Tree Level Order Traversal II}

Leave a Reply

Your email address will not be published. Required fields are marked *