How to configure Java 7 as java by default on the latest version of OS X 10.8.2?

Import: Apple's latest update in October 2012 resulted in significant Java changes to Mountain Lion (OS X 10.8.2), one of the changes being the removal of Java Preferences.

This question asks how to configure Java Java 7 to Java by default on these systems that previously had Apple Java-6 vesion.

One of the requirements is to change the standard java for command line and 7.

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

+4
source share
1 answer

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

 export JAVA_HOME=`/usr/libexec/java_home` 
+3
source

Source: https://habr.com/ru/post/1441579/


All Articles