I love Java Series --- [Linux system installed JDK]

Reprinted from network: https://www.cnblogs.com/apollospotatolikett/p/6206928.html , wrote this in more detail, I do not write.

Linux Operating System Deployment JDK

jdk Download: http://www.oracle.com/technetwork/java/javase/downloads/index.html

  • Create a new directory / usr directory itheima specialized storage-related software installed

  • linux JDK version uploaded from windows to linux local computer system in / usr / itheima down

  • Extract the package using tar -xvf in the current directory

    • tar -xvf jdk-8u181-linux-i586.tar.gz

  • JAVA environment variable configuration

    • Edit the file / etc / profile vi / etc / profile

    • Add environmental variables related to the following path in the system that represents the current path linux $ variable name indicates that the corresponding path is similar to the use of windows in the system%: connecting a plurality of paths colon

    • Export into effect using the corresponding path

    # The SET the Java Environment 
        JAVA_HOME . = / Root / itheima / jdk1 8 .0_181 # this directory into your own jdk directory of 
        the CLASSPATH =:. $ JAVA_HOME / lib.tools.jar 
        the PATH = $ JAVA_HOME / bin: $ the PATH 
        Export JAVA_HOME CLASSPATH PATH

     

    • Save and Exit

  • Reload the configuration file profile, file update to take effect.

    • source /etc/profile

    • JAVA environment variable test: the input detecting javac or java.

Guess you like

Origin www.cnblogs.com/hujunwei/p/11297055.html
Recommended