Running Java applications on OS X with only Java 7 installed
If Java 7 is the only Java environment on a Mac, quite a few applications demand the installation of a Java 6 environment:
To open “Eclipse”, you need a Java SE 6 runtime. Would you like to install one now?
To open “Adobe Device Central CS5″, you need a Java 6 SE runtime. Would you like to install one now?
To open “Cyberduck”, you need a Java 6 SE runtime. Would you like to install one now?
I didn’t want to pollute my Mac with an outdated Java version. Here’s a tip that works well with Eclipse and CS5 and may work with other Java software which ignores the presence of a Java 7 SDK as well. So far I’ve only tested it with OS X 10.8.3. It may or may not work with earlier or later versions of OS X.
At first you need to determine which Java 7 version is currently installed. Open Terminal and enter
cd /Library/Java/JavaVirtualMachines ls
You should get something like
jdk1.7.0_21.jdk
I’m using this version as a sample below. Replace the name of the Java 7 SDK directory in the first line below and execute the commands:
export JDK=jdk1.7.0_21.jdk # needs to be replaced! sudo mkdir /System/Library/Java/JavaVirtualMachines sudo ln -s /Library/Java/JavaVirtualMachines/$JDK \ /System/Library/Java/JavaVirtualMachines/1.6.0.jdk
And you’re all set!
Comments(0)











Recent Comments