JDK is a Java language software development toolkit, mainly used for java applications on mobile devices and embedded devices. JDK is the core of the entire Java development. It includes the JAVA runtime environment (JVM+Java system class library) and JAVA tools. This article mainly shares with you how to install jdk in linu. I hope it can help you.
1: Download jdk
Address: Click to open the link
##2: Uninstall openjdk
Some versions of centos have OpenJDK installed by default, so you need to check it firstCommand: rpm -qa | grep java
displays as follows: (If it exists, uninstall it, if not, don’t use it.) Note that the version may be slightly different, whichever is actual.
tzdata-java-2013g-1.el6.noarch
java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64
java-1.6.0-openjdk-1.6.0.0 -1.66.1.13.0.el6.x86_64
Uninstall openjdk:
rpm -e --nodeps tzdata-java-2013g-1.el6.noarch
rpm -e --nodeps java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64
rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-1.66.1.13. 0.el6.x86_64
Three: Create directory, upload, decompress
[html] view plain copy
view plain copy
##[root@localhost java]# tar -zxvf jdk -8u161-linux-x64.tar.gz #Decompression##[root@localhost java]# mv jdk1.8.0_161 jdk #Rename
[root@localhost java]# vi /etc/profile
##[plain]
#set java environment
Linux uninstall jdk, rpm command, rm Command parameter method
Linux installation JDK, Tomcat and MySQL graphic tutorial
Linux installation JDK implementation steps detailed explanation
The above is the detailed content of How to install jdk in linu. For more information, please follow other related articles on the PHP Chinese website!