简体   繁体   中英

How to update java on macOS Sierra 10.12

I am trying to install eclipse-cpp oxygen on macOS Sierra 10.12. While installing it i get an error that java version is not 1.8, while I had already installed latest JDK package. on terminal it shows java version as below

java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468-11M4833)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)

Please suggest how can I upgrade my java version.

Apple don't provide a version of Java greater than Java 6. You must install Java 8 from the Oracle site.

In order to run Eclipse you must install the full JDK, the JRE download is not enough as it does not include the java executable.

The Oracle site is here

You can install Java8 from here. http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

make sure to check the latest binaries of java and javac in PATH. You can override the old java binaries in path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM