On my Mac I have two different indications of the activated JAVA version

$ uname -a
Darwin Mr-MBP.lan 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64

Via the command line

$ java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

unfortunately via the GUI

enter image description here

GUI java indication is 1.8

So I tried to do it via command, but then it doesn't find the 1.8 version (it is also not in the directory of the JVMs)

$ ls /Library/Java/JavaVirtualMachines/
$ /usr/libexec/java_home  -v 1.8.0_45 --exec javac -version
Unable to find any JVMs matching version "1.8.0_45".
javac 1.7.0_45

A reboot didn't solve the problem.

Anybody some suggestions?



Thanks to Weaselboy

REF : source

There are two parts to Java.

There is the JRE (you are on 1.7) that OS X uses to run Java apps on your Mac.

Then there is the Java web plugin (you are on 1.8) that is used to run Java on web pages.

If you want to update both you need to install the full JDK.

That said, there is really nothing wrong with what you have going on there now. You want the latest plugin for security issues, but with the JRE to run local apps, some people keep the older version because their apps may not run on the newer one.

For myself it is still a little bit confusing. After reading this, I'm little bit confused, because I didn't install another version (before the update of the jdk now), or a plugin for the web ... http://www.javatpoint.com/difference-between-jdk-jre-and-jvm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.