Install jdk in linux environment and configure jdk environment variables
jdk1.8 download address: https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
This is what I downloaded before and you can leave a message if you need it. The
following is the installation of jdk:
First upload the package to the virtual machine: my upload location -->/usr/local/java
Unzip jdk: tar -zxvf jdk-8u11-linux-x64.tar.gz
configure environment variables: vi /etc/profile
add in the /etc/profile file:
export JAVA_HOME=/usr/local/java/jdk1.8.0_11
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
Save and exit in the enable file:source /etc/profile
Test it: javac -version
jdk environment installation is complete