Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Desmond Leung updated April 7, 2015 at 1:59 PM

...

  1. 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/
  2. Open Terminal.app
  3. Type in the following command:

    1. Code Block
      java -version


    2. 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.



    3. 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.



  4. 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


  5. Type in the following command:

    Code Block
    java -version


  6. 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

...