Configure the java environment on linux

1. Download and installation of ljdk
Address : http://www.oracle.com/technetwork/java/javase/downloads/jdk10-downloads-4416644.html
After downloading, upload the rz command to the linux system

2. First create a directory java: "cd usr", "mkdir java"


3. Enter the directory "cd /usr/java" and decompress: "tar -zxvf jdk-8u111-linux-x64.tar.gz"


4. Configure environment variables. Enter the command: "vim /etc/profile" and add the following at the end of the text:

      JAVA_HOME=/usr/java/jdk1.8.0_111
      PATH=$JAVA_HOME/bin:$PATH
      CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
      export JAVA_HOME
      export PATH
      export CLASSPATH


5. Modify After that, enter source /etc/profile to make the environment variables take effect


6. Check the installation. Enter the command: "java -version" to display jdk information









Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325841808&siteId=291194637