Changing JDK6 as the default on Mac OS X


Mac OS X version 10.6 (Snow Leopard) comes with JDK6. 10.5 (Leopard) comes with JDK5 with an option to download an update that will install JDK6 on your machine.

However, even after installing the update, JDK6 does not run as default. Use the following tip to update the version of Java on a Mac OS X machine.

  • Download and install Mac OS X update 4 from here. This will install JDK 6 on your machine.
  • Open a Terminal Window
  • Change directory to /System/Library/Frameworks/JavaVM.framework/Versions by typing the following command

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

  • Type the following command to switch the default version

    sudo ln -fhsv 1.6 CurrentJDK

  • That should be it. Type the following command to confirm the version has been updated

    java -version

  • Now you should be able to run you JDK6 compatible application

IMPORTANT: JDK6 from Apple is only available on 64-bit platform. It is not available for 32-bit machines. Refer to http://support.apple.com/kb/HT3581 for details. You can get a 32-bit version of JDK6 from SoyLatte - Port of BSD Java.

Navigation

Social Media

Powered by 10MinutesWeb.com