26

I've installed on my iMac (Mac OS X 10.6.6) the Java update which contains the version 1.6.0_24 of the jdk. I think this update has changed the directory structure of the jdk, so now I'm not able to configure it on eclipse. Before the update my eclipse were linked to this path: /System/Library/Frameworks/JavaVM.Framework/Versions/Current/Home which actually seems wrong. Now I'm not able to link my eclipse to the jdk. Maybe this is the right path: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home, but 1.6.0.jdk isn't a directory, so I'm not able to choose it in eclipse.

Has anyone experienced this problem? How can I solve it?

javanna
  • 59,145
  • 14
  • 144
  • 125
  • The path you have given `/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home` is the one I am using and I seem to have no problems. – James Greenhalgh Mar 11 '11 at 10:32
  • Thank you so much. Actually I'd like to add this jdk in my eclipse configuration, but I can't choose 1.6.0.jdk into /System/Library/Java/JavaVirtualMachines. I think this is not a directory and eclipse doesn't recognise it. Is it possible? – javanna Mar 11 '11 at 10:44
  • 2
    Bit of a workaround but... If you press the / key at the open dialogue it will allow you to type the absolute path of the directory you want to go to. This will allow you to go to the directory above. – James Greenhalgh Mar 11 '11 at 10:52
  • Thank you, I've solved it. I don't know why but I missed the link CurrentJDK -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents in /System/Library/Frameworks/JavaVM.Framework/Versions. – javanna Mar 11 '11 at 10:59

6 Answers6

21

For me following jdk link is working fine on Eclipse:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

enter image description here

Muhammad Nabeel Arif
  • 19,140
  • 8
  • 51
  • 70
6

the follow directory works:

/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home

without "System"

6

It was my fault. I had also a jdk 1.5 manually installed and the update moved it away. Probably I made a mistake restoring my jdk-1.5 to its correct location. To solve my issue I just had to restore the symbolic links /System/Library/Frameworks/JavaVM.Framework/Versions/CurrentJDK, which has to point to /System/Library/Frameworks/JavaVM.Framework/Version.

javanna
  • 59,145
  • 14
  • 144
  • 125
  • 1
    I have the same issue, but `/System/Library/Frameworks/JavaVM.Framework/Version` does not exist on my machine, neither a file nor a folder... – Andreas Dolk Apr 19 '12 at 14:12
  • In Elasticseacrh,How to write Query chaining?Means If i write query for getting some document based on docType.The first query output is given as input to next query,from this i get document based on date.How to wrie this type ogf query in elasticseacrh .Help me – RamRajVasavi Jun 01 '15 at 06:44
4

Execute /usr/libexec/java_home on the terminal shell.

It will display a list of all your installed JDKs

Bernard Choi
  • 446
  • 5
  • 3
1

On MacOSX 10.10, jdk 1.8 with IntelliJ, I use:

/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/
Aki
  • 3,709
  • 2
  • 29
  • 37
0

I was missing CurrentJDK folder as well, but I'm running Mac OS El Capitan.

In El Capitan it's not possible to modify the folder /System/Library/Frameworks/JavaVM.framework/Versions, since it is under the /System folder and SIP is protecting it (you can disable SIP, but I do not recommend), a custom CurrentJDK soft link is not allowed.

I got some legacy software which was searching for CurrentJDK, and there was no way to update the path. To solve it I had to install Java for OS X 2015-001 provided by apple (it's Java 1.6), which fixed the Versions subfolder structure by pointing to the old Java 1.6. Not the best, but it fixed my error!

pierpytom
  • 1,202
  • 1
  • 12
  • 25