Take the 2-minute tour ×

Mac OS 10.7 (Lion) comes with JDK 1.6 and java 6. Is it feasible to install 1.5 as well so the two can co-exist?

Would you just install the JDK in /System/Library/Frameworks/JavaVM.framework/Versions and then update the symlink to 1.5 so it points to the correct version instead of the default 1.6 (latest)?

Then update the JAVA_HOME environment variable accordingly?

share|improve this question
leave the jdk 5 rest in peace... –  Denis Tulskiy Aug 11 '11 at 16:38

5 Answers 5

up vote 0 down vote accepted

From here:

Better explaination:

4) Launch Pacifist and select Open Package
5) Select the mounted JavaForMacOSX10.6Update5.pkg
8) When it prompts select "Replace"
10) Download and mount Safari 5.0.5 from http://appldnld.apple.com.edgesuite.net/content.info.apple.com/Safari5/041-0564. 20110413.Fi9pb/Safari5.0.5SnowLeopard.dmg
12) This time select Extract and place it onto your desktop
15) Try your Secure App Manager.

share|improve this answer

I've been following the links and script on this website to install it on Mac OS 10.7.5 64-bit, and it's been working fine except when I install Apple Java Security updates, which seem to make my JDK terminate on startup without any notifications.

Reinstalling it has been fixing the issue.

I also use a simple Bash script to change the JAVA_HOME to the JDK 1.5 location, when I need to switch from 1.6 to 1.5.

share|improve this answer

There is no need to have co-existing JDKs. Just an rt.jar (or whatever contains the J2SE classes in your OS) of the target version, the cross-compilation options and the latest JDK can compile code compatible for any earlier release that is required.

share|improve this answer
this is true if the goal is to build 1.5 compatible binaries. But each release of the JVM sees changes in GC, JIT, etc. So from a runtime perspective, there is no true substitute. –  Dilum Ranatunga Aug 11 '11 at 21:21

From what I remember, there's no 64 bit Java 1.5 for OSX. So you are going to run into problems even if you can find the installer. For example, see the unanswered How to run 32-bit Java on Mac OSX 10.7 Lion .

share|improve this answer

It's a little more complicated than in Snow Leopard, but it can be done in OS X Lion:


share|improve this answer

Your Answer


