How to install JDK and configure environment variables for Centos
This article mainly explains "how to install JDK and configure environment variables in Centos". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "Centos how to install JDK and configure environment variables"!
Download jdk
After installation through rpm-vih
Configuration / etc/profile file, appended at the end
Export JAVA_HOME=/usr/java/jdk1.8.0_11
Export PATH=$JAVA_HOME/bin:$PATH
Export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
The path is subject to the environmental installation.
At this point, I believe you have a deeper understanding of "how to install JDK and configure environment variables in Centos". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!