Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 379
Vandit Jain Avatar asked Oct 30 '22 03:10

Vandit Jain


1 Answers

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

like image 109
greg-449 Avatar answered Nov 09 '22 10:11

greg-449