Desmond Leung updated April 7, 2015 at 1:59 PM
...
- Download and install the latest version of Java 7 or Java 8 from Oracle if you have not already done so. https://www.java.com/en/download/
- Open Terminal.app
- Type in the following command:
Code Block java -version
- If the version number looks like 1.7.X_XX OR 1.8.X_XX, then an Oracle version of Java is already set as the default runtime environment. Do not proceed to the next steps.
- If the version number does not does not look like 1.7.X_XX OR 1.8.X_XX, then an Oracle version of Java is not set as the default runtime environment. Proceed to the next step.
Type in the following two commands:
Code Block sudo mv /usr/bin/java /usr/bin/java-1.6
sudo ln -s '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java' /usr/bin/java
Type in the following command:
Code Block java -version
- It should now indicate that Java 7 or Java 8 is the default runtime environment.
For more information, see https://gist.github.com/johan/10590467
...