Skip to main content

Using JDK 1.6 under MAC OS 10.5.8

2 replies [Last post]
jpiotrowski
Offline
Joined: 2011-09-21
Points: 0

The JDK 1.6 is installed under MAC OS X 10.5.8, but the current JDK is 1.5.
cd /System/Library/Frameworks/JavaVM.framework/Versionsls -Flas
total 72
0 drwxr-xr-x 15 root wheel 510 29 jui 15:45 ./
0 drwxr-xr-x 12 root wheel 408 29 jui 15:45 ../
8 lrwxr-xr-x 1 root wheel 5 29 jui 15:44 1.3@ -> 1.3.1
0 drwxr-xr-x 3 root wheel 102 29 sep 2007 1.3.1/
8 lrwxr-xr-x 1 root wheel 5 3 sep 2009 1.4@ -> 1.4.2
8 lrwxr-xr-x 1 root wheel 3 28 jui 2008 1.4.1@ -> 1.4
0 drwxr-xr-x 8 root wheel 272 15 nov 2007 1.4.2/
8 lrwxr-xr-x 1 root wheel 5 29 jui 15:44 1.5@ -> 1.5.0
0 drwxr-xr-x 8 root wheel 272 15 nov 2007 1.5.0/
8 lrwxr-xr-x 1 root wheel 5 29 jui 15:44 1.6@ -> 1.6.0
8 lrwxr-xr-x 1 root wheel 59 29 jui 15:44 1.6.0@ -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents
0 drwxr-xr-x 10 root wheel 340 29 jui 15:45 A/
8 lrwxr-xr-x 1 root wheel 1 29 jui 15:45 Current@ -> A
8 lrwxr-xr-x 1 root wheel 3 29 jui 15:44 CurrentJDK@ -> 1.5

The URL hyyp://web.synametrics.com/JDK6OnLeopard.htm explains :
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.

-f If the target file already exists, then unlink it so that the link may occur.
-h If the target_file or target_dir is a symbolic link, do not follow it. This is most useful with the -f option, to replace a symlink which may point to a directory.
-s Create a symbolic link.

It is right ?
Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tobimichigan
Offline
Joined: 2011-09-03
Points: 0

From my little experience, I think an update to jdk is preffered action than an override procedure..try executing on 1 instance installation..this should solve your problem..regardless of your operating system.

jpiotrowski
Offline
Joined: 2011-09-21
Points: 0

tobimichigan wrote:

From my little experience, I think an update to jdk is preffered action than an override procedure..try executing on 1 instance installation..this should solve your problem..regardless of your operating system.

I have written "The JDK 1.6 is installed under MAC OS X 10.5.8" : no update to do...