[JDK] MacBook JDK installation and uninstallation procedures

 

A mounting step

1. official website to download jdk

https://www.oracle.com/technetwork/java/javase/downloads/index.html

Check Accept License Agreement, clickjdk-8u221-macosx-x64.dmg Download

 2. Install

Double-click the downloaded jdk

 Pop-up window, and then double-click jdk

 

 Pop-up window, click Continue

 

 The installation is complete, click Close

 3. Verify

command + space, input ter, carriage return

 

Enter java -version

 

Jdk version information that is displayed successful installation

 

Second, the uninstall procedure

输入 
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin

Enter the password 
sudo rm -fr /Library/PreferencesPanes/JavaControlPanel.prefpane

Find the current version 
enter: ls / Library / Java / JavaVirtualMachines  /

 

Output: jdk1.8.0_221.jdk

sudo rm -rf /Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk

Guess you like

Origin www.cnblogs.com/Y-S-X/p/11318620.html