Mac卸载Java和安装openjdk
2018年12月17日 - 由Bo 0 评论 3060 阅读
卸载java:
https://blog.csdn.net/haozhugogo/article/details/54809545
在“终端”窗口中,复制和粘贴命令:
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencesPanes/JavaControlPanel.prefPane
sudo rm -fr ~/Library/Application\ Support/Java
请勿尝试通过从 /usr/bin
删除 Java 工具来卸载 Java。此目录是系统软件的一部分,下次对操作系统执行更新时,Apple 会重置所有更改。
注意:上面是官网的卸载步骤,按照上面的卸载完后,要从finder中进入 /Library/Java/JavaVirtualMachines,然后删除jdk1.8.xxx,这样才算彻底卸载完成
windows的openjdk的下载:
https://stackoverflow.com/questions/5991508/openjdk-availability-for-windows-os
https://github.com/ojdkbuild/ojdkbuild
mac上openjdk:
特定版本的github的下载,但是是source:
https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u192-b12/OpenJDK8U-jdk_x64_mac_hotspot_8u192b12.tar.gz
https://stackoverflow.com/questions/29456149/build-openjdk-on-mac-java-home-is-not-defined-correctly
brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk8
==========================================================
$ java -version
java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)
$ java -version
openjdk version "1.8.0_192"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_192-b12)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.192-b12, mixed mode)