Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.
Hi there, I have a really nice solution. Just create a file like "switchJDK.sh", making it executable (chmod +x switchJDK.sh) and you can switch between your default JDK in seconds. Simply execute the script (name$ ./switchJDK.sh 1.6.0). If you run it without parameters it will show you the JDKs installed. You can switch back and forth between JDKs as often as you want. Very nice.. I found this script a while ago.. So all the credit goes to "unknown":-) #!/bin/sh cd /System/Library/Frameworks/JavaVM.framework/Versions CURJDK="`readlink CurrentJDK`" echo Current JDK version: $CURJDK if [ "$1" == "" ]; then echo Installed versions: ls exit fi VERFOUND=`ls | grep $1 | head -n 1` if [ "$VERFOUND" != "$1" ]; then BASE="`basename $0`" echo Error: Could not change JDK-- version $1 not installed! echo Run $BASE without arguments to see a list of installed versions. exit 127 fi echo You must now enter your Mac OS X password to change the JDK. sudo ln -fhsv $1 CurrentJDK Best Nikolai Manek http://www.nikotel.com