Install OpenJDK10 under Ubuntu
Copyright statement: welcome to reprint, please indicate the source, thank you. https://blog.csdn.net/boling_cavalry/article/details/83213608
The Ubuntu version is 16.04.5 LTS, the steps to install OpenJDK10 are as follows:
- Download the installation file, open the address in the browser: http://jdk.java.net/java-se-ri/10, click the circle in the red box in the figure below:
- Click the link in the red box below to start downloading the installation file:
- Put the downloaded jdk-10_linux-x64_bin_ri.tar.gz file into the Ubuntu directory /usr/lib/jvm, and then execute the following command to decompress:
tar -zxvf jdk-10_linux-x64_bin_ri.tar.gz
- Now, there is a jdk-10 directory in the /usr/lib/jvm directory;
- Modify the /etc/profile file and add the following content at the end:
export JAVA_HOME=/usr/lib/jvm/jdk-10export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
- Execute the command source /etc/profile to make the configuration effective;
- After installation, execute the command java -version to verify, the information is as follows:
root@docker:~# java -version
openjdk version "10"2018-03-20
OpenJDK Runtime Environment 18.3(build 10+44)
OpenJDK 64-Bit Server VM 18.3(build 10+44, mixed mode)