Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I downloaded the latest version of Java from Oracle site and installed it on my mac.

MacCris:~ cris$ java -version
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

then,

MacCris:/ cris$ ls -l /System/Library/Frameworks/JavaVM.framework/Versions
total 64
lrwxr-xr-x  1 root  wheel   10 Jan  3 20:20 1.4 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Jan  3 20:20 1.4.2 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Jan  3 20:20 1.5 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Jan  3 20:20 1.5.0 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Jan  3 20:20 1.6 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Jan  3 20:20 1.6.0 -> CurrentJDK
drwxr-xr-x  7 root  wheel  238 Jan  3 20:20 A
lrwxr-xr-x  1 root  wheel    1 Jan  3 20:20 Current -> A
lrwxr-xr-x  1 root  wheel   59 Jan  3 20:20 CurrentJDK -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents

going to /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents and executing

MacCris:bin cris$ /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -version
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)

So the currentJDK is 1.6 despite i installed latest java.

share|improve this question
    
Are you asking why "java --version" gives 1.0.6 even though you have installed 1.7? –  Phorce Jan 30 '13 at 18:06
    
Current is in 1.6.0.jdk and shows the latest 1.6 and the one you installed is 1.7 what exactly are you asking? –  Mark Jan 30 '13 at 18:25
    
Sorry thanks ...i was tired when i wrote it...thanks for clear things...i did not paid attention to MacCris:bin cris$ /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -version java version "1.6.0_37" Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909) –  Cris Jan 30 '13 at 19:00
    
actially I was puzzled why CurrentJDK is 1.6 not 1.7 –  Cris Jan 30 '13 at 19:06

1 Answer 1

up vote 2 down vote accepted

The Oracle Java ie 1.7 does not install itself in the same place as the Apple Java ie <= 1.6.

The java executable is in /Library/Java/JavaVirtualMachines/jdk1.7.0_11.jdk/Contents/Home/bin/java

This is possibly because only Apple supplied files should be under /System

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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