Eclipse download and jdk environment variable configuration under Mac m1

1. Install eclipse

1. Download eclipse

Eclipse downloads - Select a mirror | The Eclipse Foundation

This version is suitable for m1 chip

2. After downloading, follow the next step to install it.

After successful installation, you can see the icon:

 2. Install jdk

1. Download jdk

Just download this version. After the download is complete, click Next to install;

 2. After the installation is complete, configure environment variables

1. Check the jdk installation path:

/usr/libexec/java_home -V

 This path is the path where the installed jdk is located.

2. Enter the home directory

cd /Users/computer name

3. Edit the file and configure environment variables

vim .bash_profile

4. Add the following three lines to the end of the file

JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-19.jdk/Contents/Home

export PATH=$JAVA_HOME/bin:$PATH:.

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

5. Make the configuration file effective

source .bash_profile

6. Check whether the configuration is successful

java -version

Seeing the above version information means the configuration is successful. 

 

Guess you like

Origin blog.csdn.net/liuwkk/article/details/131945012