Article directory
background
The author originally installed JDK8 on the computer. Since MAT is needed, MAT supports MAC m1 only compatible with JDK17 and above versions, so JDK17 needs to be installed, and it is hereby recorded.
download
First, download JDK17 from the oracle official website: https://www.oracle.com/java/technologies/downloads/#java17
Install
JDK is installed in the /Library/Java directory by default. Open the Finder and go directly to the file through shift+command+g. If the installation is successful, there will be two JDKs in the /Library/Java/JavaVirtualMachines directory:
configuration
Next, open the terminal, enter vim ~/.bash_profile , and edit the configuration file.
In the configuration file, configure the following content:
input is complete, press the esc key, enter: wq to save and exit, and then execute the command: source ~/.bash_profile
version switching
Next, you can switch between multiple versions: