开发者

Mac OS X Java Update: where is my jdk?

开发者 https://www.devze.com 2023-02-16 09:28 出处:网络
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开发者_StackOverf

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开发者_StackOverflow社区 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?


For me following jdk link is working fine on Eclipse:

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

Mac OS X Java Update: where is my jdk?


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.


the follow directory works:

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

without "System"


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

It will display a list of all your installed JDKs


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

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


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!

0

精彩评论

暂无评论...
验证码 换一张
取 消