Install JDK under Centos7 and configure system environment variables

1. First go to the official website to download the required JDK package Insert image description here
2. Unzip it to the opt directory
Insert image description here
3. Edit the system environment variables with vim /etc/bashrc
Insert image description here

4. Save and exit, enter java -version to test the installation is successful.

Insert image description here

Guess you like

Origin blog.csdn.net/qq_41265137/article/details/106770354