Sitelet https://github.com/0551/AppDevTools/issues/19
Skip to content

Java卸载&重装 #19

Description

@easyli

dmg的方式安装后的卸载

安装官方的方式,如下

https://www.java.com/zh_CN/download/help/mac_uninstall_java.xml

sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencesPanes/JavaControlPanel.prefPane
sudo rm -fr ~/Library/Application\ Support/Java

终端运行 java -version看到并没有真正卸载。

按照官方另外一份文档成功卸载

http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html#uninstall

Navigate to /Library/Java/JavaVirtualMachines and remove the directory whose name matches the following format:*

/Library/Java/JavaVirtualMachines/jdk<major>.<minor>.<macro[_update]>.jdk

For example, to uninstall 7u6:

% rm -rf jdk1.7.0_06.jdk

Do not attempt to uninstall Java by removing the Java tools from /usr/bin. This directory is part of the system software and any changes will be reset by Apple the next time you perform an update of the OS.

Homebrew方式重装

brew update
brew cask install java

Tip:确保安装来Homebrew && Caskroom

*安装多个JDK

http://www.cnblogs.com/masb/p/4894016.html

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions