sorin
sorin

Reputation: 170508

How to configure Java 7 as default java on latest OS X 10.8.2?

Import: last update from Apple made in October 2012 made signifiant changes to Java on Mountain Lion (OS X 10.8.2), one of the changes is the removal of Java Preferences.

This question asks on how to configure Oracle Java 7 to be default java on these systems, which previously had Apple Java-6 vesion.

One of the requirements is to change default java for the command line to be 7 too.

Assume the the user already installed Java 7 SDK from Oracle but java -version stil returns java 6.

Upvotes: 4

Views: 1554

Answers (1)

sorin
sorin

Reputation: 170508

Adding this to my .bash_profile seems to solve the problem, or at least some part of it:

export JAVA_HOME=`/usr/libexec/java_home`

Upvotes: 3

Related Questions