Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

droopy4u

macrumors newbie
Original poster
Jul 18, 2015
4
1
Belgium
On my Mac I have two different indication of the 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

7UQY4.png



GUI java indication is 1.8

So I tried to do it via command, but then it doesn't recognise


$ ls /Library/Java/JavaVirtualMachines/
jdk1.7.0_45.jdk
$/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.
 
Last edited:
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.
 
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.

...

@Weaselboy Thanks for your quick answer, I gonna try to install the full JDK, so both versions are the same and up-to-date.
 
  • Like
Reactions: Weaselboy
@Weaselboy Thanks for your quick answer, I gonna try to install the full JDK, so both versions are the same and up-to-date.


@Weaselboy, I have a stupid question ... how does it come that I still have two different versions?
https://www.java.com/en/download/faq/java_mac.xml
I followed the note and installed the 8u51 jdk

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
 
What are you showing installed now? You may have both JRE 7 and 8 installed at once so apps can use either.
 
What are you showing installed now? You may have both JRE 7 and 8 installed at once so apps can use either.

command line :


java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)


GUI indication :

gives still the same indication of version 1.8.0_45

 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.