Java installation JDK process in Linux environment

Software download:
Software uninstall: Uninstall the
existing OpenJdk
query the existing Java Jdk version java -version
Insert picture description here

Check the installed version rpm -qa|grep java
Insert picture description here

To uninstall:
rpm -e --nodeps java-1.8.0-openjdk-1.8.0.102-4.b14.el7.x86_64rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.102-4.b14 .el7.x86_64rpm -e --nodeps java-1.7.0-openjdk-headless-1.7.0.111-2.6.7.8.el7.x86_64
View uninstallation java -version
Insert picture description here

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Upload Linux system cd /usr/local/soft/ to
decompress: tar -zxvf jdk-8u11-linux-x64.tar.gz
Insert picture description here

Configure environment variables: vim /etc/profileexport JAVA_HOME=/usr/local/soft/jdk1.8.0_11export PATH= PATH PATHP A T H JAVA_HOME/bin
save and exit to make the modification effective immediately: source /etc/profile
verification: java -version

Guess you like

Origin blog.csdn.net/qq_2662385590/article/details/107546241