Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install java jdk 7 on Snow Leopard

My Mac currently is running Snow Leopard (10.6.8), and I would like to develop with Java 7. I downloaded the Java 7 OS X installer from Oracle's website, started to run it. Unfortunately, I was immediately greeted with a message that said the installer is supported only on OS X Lion (10.7.3). Is there any way I can get Java 7 on my machine with Snow Leopard? I am not buying a new OS just to upgrade my Java. I googled around some, but I am not finding much. I'm hoping I can find some help here. Thanks.

like image 538
dnc253 Avatar asked Nov 23 '12 23:11

dnc253


People also ask

How do I download and install JDK 7?

Sign in using your Oracle account (or create a new one) and the download should start. Once the download is complete, locate the jdk-7u80-windows-x64.exe file and double-click to run the installer. Click Next and on the following screen optionally change the installation location by clicking on the Change... button.


2 Answers

Use Pacifist from http://www.charlessoft.com/ to open and install the 'JDK 7 Update X.pkg' in the 'jdk7-7uX-macosx-x64.dmg' file you download from http://www.oracle.com/technetwork/java/javase/downloads/index.html

like image 132
reukiodo Avatar answered Sep 16 '22 20:09

reukiodo


From what I have read JDK 7 does not require 10.7+ so I simply opened the shipped .pkg installer file with PackageMaker (an Xcode tool) and removed the OS version requirement and re-built it.

You will need to copy the installer out of the .dmg file since you have to save changes.
Edit: You will need to Build to another directory as the mounted .dmg is read-only.

So far in my using this I haven't experienced any issues, even the Java preference pane is working properly.

One thing to note, you will have to reorder JDKs in Java Preferences.app to get programs to use the new JDK instead of Java 6.


I've even gone as far as to copy the Java 7 .jdk bundle into /System/Library/Java/JavaVirtualMachines/, and it seems to be function normally.

Just don't move/rename the JDK bundles while Java applications are running; not that I've done that by accident or anything...

like image 21
Hawken Avatar answered Sep 16 '22 20:09

Hawken