Linux (CentOS) install JDK

   Newcomers join, everyone take carelaughing out loud

    I recently started learning Linux, first deploying a java web service, and first installing JDK.

   Software version

    1. Check whether the system comes with JDK java -version

    2. View all installed java  rpm -qa | grep java

    3. Delete the installed java  rpm -e --nodeps java filename

    4. Install the transfer file plugin  yum install lrzsz

    5. Transfer directory, transfer to the current directory rz

    6. Install the JDK file  rpm -ivh where the jdk file is located

    7. Modify the configuration file  vi /etc/profile and insert the following content

export JAVA_HOME = /usr/java/jdk1.8.0_65
export CLASSPATH = .:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/tools.jar
export PATH = $PATH:$JAVA_HOME/bin

     :wq save and exit

    8. Check if the environment variable is configured successfully javac

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326894784&siteId=291194637
Recommended