Mac configures the jdk environment and installs IDEA

  1. Open the terminal to get the java installation path

Enter in the terminal: /usr/libexec/java_home -V

The address of the intermediate java se8 will be used later

  1. Complete the path in the configuration file

Open the profile open -e .bash_profile

Paste the following template into the bash profile, and replace my jdk address with the address behind the above java se8 and save it

#JAVA

JAVA_HOME= my jdk path

PATH=$JAVA_HOME/bin:$PATH:.

CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:.

export JAVA_HOME

export PATH

export CLASSPATH

  1. Effective configuration file

Then go to the terminal and enter: source ~/.bash_profile

Finally, you can enter java -version under each file to check whether it is global

4. Download the IDEA installation package

Installation package link: https://pan.baidu.com/s/1-AcpDelmG0_mb0bzxGWD7Q Extraction code: 2hys

After downloading, click the dmg file to install

5. Enter the activation code

Go to the browser to search for the idea activation code (find a few more and keep trying), paste it into the box below, and click activate

Guess you like

Origin blog.csdn.net/weixin_46516647/article/details/129719816