Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

OS X 10.8 removed Java 6 and the Java Utilities switcher and made Java 7 the default jre making it hard for engineers like me who work exclusively on Java 6. How do I get back my Java 6? Note: I tried Google but many of the supposed solutions are outdated.

share|improve this question
up vote 5 down vote accepted

The simplest solution I found is to

  1. Download the jdk6 (download button is on top right)
  2. Unpack it to somewhere. Preferably to /System/Library/Frameworks/JavaVM.framework/Versions/1.6. This is what it looks for me:

    > ls /System/Library/Frameworks/JavaVM.framework/Versions/1.6                                                                                                    
    Classes       Commands      Home          Info.plist    Libraries     MacOS    Resources   version.plist
  3. Set your $JAVA_HOME to your new location by doing export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/ before your $PATH in your ~/.bashrc (or ~/.zschrc) file

  4. Prepend $JAVA_HOME to your $PATH by doing this export PATH=$JAVA_HOME/bin:/usr/bin:/bin:/us..........
  5. Restart your shell or do source ~/.bashrc
share|improve this answer
I think they have changed the link to the JDK6 that you posted. it now is a DMG with a .pkg installer. Now way to extract it to a directory. – Amala Apr 8 '13 at 14:42
@Amala The installer will use the mentioned directory automatically. – ᴠɪɴᴄᴇɴᴛ Feb 11 at 16:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.