How to install java jdk 7 on Snow Leopard

JavaOsx Snow-LeopardJava 7

Java Problem Overview


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.

Java Solutions


Solution 1 - Java

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

Solution 2 - Java

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...

Solution 3 - Java

I had the same problem and was not able to google the proper way to do it. At the end I came up with solution myself and put it on my blog:

http://jksha.blogspot.se/2013/09/java-7-and-snow-leopard-osx-106.html

Solution 4 - Java

The answer from @reukiodo is definitely the way to go, so thanks a bunch!. However, it might need some further explanation for newbs like myself.

  1. Download the two DMG's that @reukiodo posted links to.
  2. Install Pacifist.
  3. Open the java-DMG with pacifist.
  4. In the 'Package Contents'-tab (default tab), select the 'Contents of JDK 7 Update XX.pkg' (XX being e.g. 51)
  5. Click the 'Install' button and follow the on-screen instructions.
  6. Open Java Preferences.app in yout Utilities folder and drag Java SE 7 to the top of the list of Java versions in the 'General'-tab (default tab)
  7. (OPTIONAL: Work with Eclipse: Follow the steps by Heath Borders answered to another, but similar question. NB! This is actually for OSX 10.7 Lion, but the same procedure holds, and it worked for me on 10.6.8 Snow Leopard.)

Solution 5 - Java

There are two ways to do this.

  1. Download Pacifist from charlessoft.com and open the JDK PKG in it (and extract the application.)
  2. Open the PKG in PackageMaker (a tool for developers) and remove the requirement of 10.7.3.

Good luck!

Solution 6 - Java

I was able to compile openJDK 7 for snow leopard (works entirely, AWT included), from some patches at this project:
https://github.com/hgomez/obuildfactory/

If you want my binaries for a little bit of an easier time, here they are:
https://bintray.com/wyatt8740/generic/openjdk7-sdk-osx-10.6/20140622/view

The tarball is about 57 megabytes.

Extract it under /Library/Java/JavaVirtualMachines/. The JDK will be in a directory called jdk1.7.0.jdk. Set your JAVA_HOME environment variable to /Library/Java/JavaVirtualMachines/jdk1.7.0.jdk/Contents/Home, and from then put the command for setting JAVA_HOME in your ~/.profile to make it more permanent. Log out and in for it to take full effect. The only thing missing so far is a JDK 7 browser plugin.

You can also use the "Java preferences' app (can be found in spotlight search) to set it to the default when accessed via GUI as well.

Unfortunately, I don't have access to OS X at the moment to try to make java 1.8 work, so 1.7 is probably the end of the road for 10.6.

Solution 7 - Java

You can build your own one. I did this before. It was easy. And it's as official as you can probably get:

https://wikis.oracle.com/display/OpenJDK/Mac+OS+X+Port

Solution 8 - Java

I have changed the version in the /System/Library/CoreServices/SystemVersion.plist based on this video tutorial http://www.youtube.com/watch?v=eFi-H-7-PD4

Solution 9 - Java

What you want is not impossible but for sure NOT recommended but... once you are sure that this is what you want, here is an easy way to install Java (or any software for OS related matters):

  • navigate to you MainHD/System/Library/CoreServices/SystemVersion.plist

  • backup this file !!

  • open it in Text editor and alter the product version:

     <key>ProductUserVisibleVersion</key>
    

    10.6.8 ProductVersion 10.6.8

according to you needs.

Warning: A samurai take 7 breaths before taken any decision.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questiondnc253View Question on Stackoverflow
Solution 1 - JavareukiodoView Answer on Stackoverflow
Solution 2 - JavaHawkenView Answer on Stackoverflow
Solution 3 - JavaNiksa JakovljevicView Answer on Stackoverflow
Solution 4 - Javalarsac07View Answer on Stackoverflow
Solution 5 - JavaultimatetechieView Answer on Stackoverflow
Solution 6 - JavaWyatt WardView Answer on Stackoverflow
Solution 7 - Javauser381105View Answer on Stackoverflow
Solution 8 - JavabanterCZView Answer on Stackoverflow
Solution 9 - JavaLAOMUSIC ARTSView Answer on Stackoverflow