How change CurrentJDK symbolic link in MacOS

前端 未结 3 2021
陌清茗
陌清茗 2021-01-06 15:40

Currently in my Mac I have these JAVA versions:


MyMac$ cd /Library/Java/JavaVirtualMachines

$ ls -la

total 0

drwxr-xr-x 4 root wheel

3条回答
  •  萌比男神i
    2021-01-06 16:13

    If you're running OS X 10.11 (El Capitan), there is a new feature called "Rootless" which prevents editing of files under /System/ except by installers and the like. You may be able to solve whatever problem is requiring you to update the CurrentJDK symlink just by setting the JAVA_HOME environment variable to /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home

    If you truly want to modify that /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK symlink, you will likely have have to disable Rootless mode. You could also try running the Java 7 installer again, though I'm not certain that this will work

    More information on the Rootless feature can be found here: https://apple.stackexchange.com/questions/193368/what-is-the-rootless-feature-in-el-capitan-really

提交回复
热议问题