JDK (Java Development Kit) refers to the Java development kit. JDK is the core of Java, including Java basic class library, Java runtime environment (JRE) and Java development tools. It is necessary to install for Java development.
JRE (Java Runtime Environment) refers to the Java runtime environment. The support of JRE is required when running Java programs. If the system only installs JRE, it means that the system can run any Java program, but cannot do Java development.
# mkdir /usr/java``# cd /usr/java``# wget http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz``# tar -xzf jdk-8u111-linux-x64.tar.gz``# rm -rv jdk-8u111-linux-x64.tar.gz
Edit the configuration file through the vi /etc/profile command
# vi /etc/profile
Add at the end of the text:
export JAVA_HOME=/usr/java/jdk1.8.0_111
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
Enter># java -version
to check whether the JDK is installed successfully
Version Information
# java``#javac
Display syntax help information
Content can refer to JDK
Recommended Posts