简体   繁体   English

卸载Java Mac OS X

[英]Uninstall Java Mac OS X

I am trying to remove JDK and JRE from my mac to revert back to an older version. 我正在尝试从Mac中删除JDK和JRE,以还原为旧版本。 I tried removing jdk folder from System/Library/Java/VirtualMachines as described here and i al so removed the Java applet as described here but i can still see java installed on my mac. 我尝试按照此处所述从System / Library / Java / VirtualMachines删除jdk文件夹,因此也按照此处所述删除了Java applet,但是我仍然可以在Mac上看到安装的Java。 Typing java -version gives me the following output: 键入java -version给我以下输出:

        Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
        Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Typing ls -l /usr/bin/java gives the following output - 输入ls -l /usr/bin/java给出以下输出-

/usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java

I can see a lot of folders at this location and i don't really know which one to delete to uninstall Java completely and install an older version. 我可以在此位置看到很多文件夹,但我真的不知道要删除哪个文件夹才能完全卸载Java并安装旧版本。

The Java 7 JDK is under /Library , not /System/Library . Java 7 JDK在/Library ,而不在/System/Library

Only Apple software is allowed to use /System , Java 7 and later are supplied by Oracle, so install under /Library/Java/JavaVirtualMachines . Oracle仅允许使用Apple软件使用/System ,Java 7和更高版本由Oracle提供,因此请在/Library/Java/JavaVirtualMachines下安装。 Deleting the appropriate JDK directory from there should be enough to complete the un-installation. 从那里删除适当的JDK目录应该足以完成卸载。 In particular you should not touch anything under /System/Library/Frameworks , the stuff in there is either for backwards compatibility with apps that expect the old Apple Java installation paths from Java 5 and earlier, or for the stub mechanism that makes /usr/bin/java work (and delegate to whichever real JDK is the current target of JAVA_HOME ). 尤其是你应该在碰任何东西/System/Library/Frameworks ,东西在里面要么是为与期望从Java 5的旧苹果的Java安装路径和更早版本,或存根机制,使得应用程序的向后兼容性/usr/bin/java工作(并将任何真正的JDK委托给JAVA_HOME的当前目标)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM