java linux installation step centos7

In his own official website to download more at ease jdk

  1. Oracle JDK version into the official website to download the appropriate
    jdk-8u231-linux-x64.tar.gz
  2. usr directory under the new folder the Java
    mkdir the Java
  3. xftp upload compressed files to this folder
  4. Unpack the JDK
    tar -zxvf the JDK-8u231-Linux-x64.tar.gz
  5. Set Environment Variables
set java environment
JAVA_HOME=/usr/local/java/jdk1.8.0_231        
JRE_HOME=/usr/local/java/jdk1.8.0_231/jre     
CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME JRE_HOME CLASS_PATH PATH
  1. Changes to take effect
    source / etc / profile
Published 49 original articles · won praise 5 · views 60000 +

Guess you like

Origin blog.csdn.net/wangwenpeng0529/article/details/103543343