The alternative is to fuzz around with Apple's insane maze of hyperlinks, but honestly life is too short to bother. Then add that to your PATH: export PATH=$JAVA_HOME/bin:$PATH I also set my JAVA_HOME to point to where jdk_1.7.0_xx.jdk was installed: export JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home' (copied here as it was mentioned that 'above' may eventually not make sense as answers are re-sorted). System/Library/Frameworks/amework/Versions/CurrentJDK Regarding IntelliJ IDEA - that will still ask you to install Java 6 as it apparently needs an older class loader or something: just follow the instructions when the dialog pop-up appears and it will install the JDK 6 in the right place.Īfterwards, you will need to do the sudo ln -snf mentioned in the answer above: sudo ln -nsf /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents \ There are two ways to install the Java runtime.
The right place to download the JDK for Java 7 is Java SE Downloads.Īll the other links provided above, as far as I can tell, either provide the JRE or Java 6 downloads (incidentally, if you want to run Eclipse or other IDEs, like IntelliJ IDEA, you will need the JDK, not the JRE). The Java runtime is no longer installed automatically as part of the OS installation.