04 November 2013

Java JDK on OS-X (here: 10.9, Mavericks)

Boredom warning: This post describes some commands to configure Java-7 on Mac OS-X. Now fun to read.


After my recent upgrade to 10.9, I had to install Java again (Apple seems to be regarding Java as something evil…)

The Apple-Java is still 1.6 - if you’re happy with that: use the proposed download from Apple and you’re all set.

If, e.g. for software development, you want something a bit more recent...


Downloading from Oracle, running the installer… but still, 1.6 is the active JDK.

(Simple) solution: In any shell (e.g. Terminal, iTerm):

sudo ln -sf /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK


On your system, the PATH to java might be set at three different locations:


If you happen to have / need  a JAVA_HOME environment variable:

export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home"

Make sure, JAVA_HOME is set in one of the abovementioned locations. I suggest you get rid of it… (delete it from ~/.profile)




No comments: