[英]Uninstalling JDK 8 on OSX
How can I cleanse my Mac of Java 8 -- jdk, not jre or plugin, which I don't care about? 如何清理我不关心的Java 8 Mac(jdk而不是jre或插件)? I need to downgrade to jdk 7. I've found docs online but they're all about the java plugin.
我需要降级到jdk7。我在线找到了文档,但是它们都是关于Java插件的。 If I try simply installing jdk 7 (on top of 8), the 8 is still there.
如果我尝试简单地安装jdk 7(位于8之上),则8仍然存在。
You can uninstall a JDK simply by deleting the appropriate directory under /Library/Java/JavaVirtualMachines
where it is installed. 您只需删除JDK的安装目录
/Library/Java/JavaVirtualMachines
下的相应目录,即可将其卸载。 But note that browsers, Java Web Start and double-clickable app bundles created with Oracle's appbundler will always use the "public JRE" under /Library/Internet Plug-Ins
, and that will remain as Java 8 unless you uninstall it separately. 但是请注意,使用Oracle的appbundler创建的浏览器,Java Web Start和可双击的应用程序捆绑包将始终使用
/Library/Internet Plug-Ins
下的“ public JRE”,除非单独卸载,否则它们仍将保留为Java 8。
But you may not actually need to uninstall Java 8 - the command line tools such as java
and javac
respect JAVA_HOME
, so you can have both versions installed side by side and pick the appropriate one with /usr/libexec/java_home
: 但是实际上您可能不需要卸载Java 8-诸如
java
和javac
类的命令行工具都遵循JAVA_HOME
,因此您可以同时安装两个版本,并使用/usr/libexec/java_home
选择合适的版本:
export JAVA_HOME=`/usr/libexec/java_home -v '1.7*'`
On my machine, I get the following output from terminal: 在我的机器上,我从终端获得以下输出:
> /usr/libexec/java_home -v 1.6
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
> /usr/libexec/java_home -v 1.7
/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home
> /usr/libexec/java_home -v 1.8
/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
Check yours and let me know. 检查您的,让我知道。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.