Installed Java SE 7u10, still seing 7u10ea on OS X?

1

0

when I type java -versionI still get the Early Access version and not the stable JDK 7u10. please how to fix that ? I am working on Mac OS X Mountain Lion.

ls /System/Library/Frameworks/JavaVM.framework/Versions

  • 1.5.0
  • 1.6
  • 1.6.0
  • A <-- ?
  • Current <-- ?
  • CurrentJDK <-- ?

What the ? stands for please ?

/usr/libexec/java_home -V

Matching Java Virtual Machines (3):
    1.7.0_10, x86_64:   "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home
    1.6.0_37-b06-434, x86_64:   "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_37-b06-434, i386: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home

The problem is java -version --> java version "1.7.0_10-ea" EA !

The worst is that /Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/bin/java -version show me the EA.

IamaTacos

Posted 2012-12-20T21:53:42.793

Reputation: 209

1Check your system path. I am betting that the newer JDK is not part of the path statement yet. – Hovercraft Full Of Eels – 2012-12-20T21:58:13.293

check what exactly please ? – IamaTacos – 2012-12-20T21:58:54.633

I found this interesting folder : /System/Library/Frameworks/JavaVM.framework – IamaTacos – 2012-12-20T22:01:45.367

@HovercraftFullOfEels ... ? – IamaTacos – 2012-12-20T22:05:33.167

What OS are you working on? If windows, then open a command window, and type in path<return> – Hovercraft Full Of Eels – 2012-12-20T22:08:27.753

I am working on MAc OS X Mountain Lion – IamaTacos – 2012-12-20T22:10:32.450

I made an echo $PATH – IamaTacos – 2012-12-20T22:10:49.797

What does /usr/libexec/java_home -V have to say? – Ian Roberts – 2012-12-20T22:12:31.233

I updated my post – IamaTacos – 2012-12-20T22:17:33.010

Answers

1

1.7 JDKs don't go into /System/Library/Frameworks, they go into /Library/Java/JavaVirtualMachines. When you run /usr/bin/java it picks the appropriate Java installation to use

  • If you have a JAVA_HOME environment variable set, then it will use that version
  • otherwise it will choose the "best" installed JDK out of the ones available in /Library/Java/JavaVirtualMachines and /System/Library/Java/JavaVirtualMachines, you can run /usr/libexec/java_home to see which one the system considers to be "best".

Of course, if you have manually added /Library/Java/JavaVirtualMachines/<something>/Contents/Home/bin to your PATH ahead of /usr/bin then java will mean that specific version rather than the one selected by the system. You can check this by running which java.

To complicate matters further, there's another copy of the JRE in /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home, which is the one used for browser plugins and for 1.7-style .app bundles that don't embed their own JRE.

Ian Roberts

Posted 2012-12-20T21:53:42.793

Reputation: 151

It found three installed Java Virtual Machine but it picks a different one. It found JVM 1.7.0u10 and it picks JVM 1.7.0u10ea – IamaTacos – 2012-12-20T22:19:12.620

When I do java -versionI get 1.7.0_10-ea I need to get 1.7.0_10 ! – IamaTacos – 2012-12-20T22:21:15.810

@ALJIMohamed and is java definitely /usr/bin/java? Try which java to find that out. – Ian Roberts – 2012-12-20T22:21:52.323

which java --> /usr/bin/java . – IamaTacos – 2012-12-20T22:24:33.047

I have never done anything manually. – IamaTacos – 2012-12-20T22:26:11.987

@ALJIMohamed If you have the JAVA_HOME environment variable set then that will take precedence over the usual discovery mechanism. Does unset JAVA_HOME help? – Ian Roberts – 2012-12-20T22:28:00.767

no and I think I had it not set. – IamaTacos – 2012-12-20T22:32:51.937

ls /Library/Java/JavaVirtualMachinesI have one JDK and it is EA. – IamaTacos – 2012-12-20T22:38:38.443

@ALJIMohamed at this point all I can suggest is that you delete jdk1.7.0_10.jdk from /Library/Java/JavaVirtualMachines and then re-install it from a fresh download. I've just tried installing it myself and I don't get -ea. – Ian Roberts – 2012-12-20T22:46:55.553

let us continue this discussion in chat

– IamaTacos – 2012-12-20T22:48:04.683

I will give it a try ... – IamaTacos – 2012-12-20T22:48:44.573