从 Mac 中删除 Java 8 JDK [英] Removing Java 8 JDK from Mac

查看:41
本文介绍了从 Mac 中删除 Java 8 JDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我前段时间安装了 JDK 8 的测试版来查看一些示例.我现在肯定地认为,在版本之间进行更改很容易.

So I installed the beta of JDK 8 a while ago to look at some of the examples. I thought for sure by now, it's easy to change between versions.

使用 IntelliJ 进行一些 Play 开发.出于某种原因,尽管 IntelliJ 使用 8 进行编译:

Doing some Play development with IntelliJ. For some reason, IntelliJ is compiling with 8 even though:

  • 我在 Preferences 中将编译器设置为使用 1.6
  • 据说它通过外部构建使用 SBT,但命令行中的 sbt 有效
  • JAVA_HOME 指向 JDK 6.

如果我转到 Java 首选项页面,它确实显示已安装 8,但没有卸载它的选项,也看不到任何其他版本.

If I go to the Java Preferences page, it does show 8 installed, but there is no option to uninstall it and it doesn't see any of the other versions.

当我做 which java 时,它告诉我 /usr/bin/java 而我做 /usr/bin/java -version它返回 1.6.

When I do which java, it tells me /usr/bin/java and I do /usr/bin/java -version and it returns 1.6.

注意:稍微摆弄一下,您可以使用 IntelliJ 和 JDK7,参见 此处.

Note: with a little fiddling, you can use IntelliJ and JDK7, see here.

推荐答案

我能够成功地在小牛中卸载 jdk 8,执行以下步骤:

I was able to unistall jdk 8 in mavericks successfully doing the following steps:

运行这个命令只是删除JDK

sudo rm -rf /Library/Java/JavaVirtualMachines/jdk<version>.jdk

如果要删除插件,请运行这些命令

sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane
sudo rm -rf /Library/Internet Plug-Ins/JavaAppletPlugin.plugin
sudo rm -rf /Library/LaunchAgents/com.oracle.java.Java-Updater.plist
sudo rm -rf /Library/PrivilegedHelperTools/com.oracle.java.JavaUpdateHelper
sudo rm -rf /Library/LaunchDaemons/com.oracle.java.Helper-Tool.plist
sudo rm -rf /Library/Preferences/com.oracle.java.Helper-Tool.plist

这篇关于从 Mac 中删除 Java 8 JDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆