CentOS7 uninstall OpenJDK, and then install Oracle JDK

1. Uninstall OpenJDK

1. Enter the following command to view the existing openjdk version####

rpm -qa|grep jdk

2. Enter the following command to uninstall openjdk####

yum -y remove the file found

3. Uninstall all openjdk files output by the rpm -qa|grep jdk command. After the uninstallation is complete, the java-related commands are not available (such as: java, java -version, javac, etc.)

Two, install JDK1.8

1. Download the linux version of jdk from the official website, and then upload the file to CentOS.

Official website download address

2. Unzip to the /usr/local/java folder, the folder needs to exist

tar -zxvf JDK compressed file name-C /usr/local/java

3. Configure JAVA_HOME

Add in the /ect/profile file and enter

vim /etc/profile

Add to

export JAVA_HOME=/usr/local/java/jdk1.8.0_144
export JRE_HOME=/usr/local/java/jdk1.8.0_144/jre
export CLASSPATH=./:/usr/local/java/jdk1.8.0_144/lib:/usr/local/java/jdk1.8.0_144/jre/lib
export PATH=$PATH:/usr/local/java/jdk1.8.0_144/bin

After adding, run the following command to make the configuration effective

source /etc/profile

4. Check if it is installed

Use the command to check if there is version information, if there is information, it means the installation is complete

java -version

Reference article: CentOS uninstall openjdk and install jdk 1.8

Recommended Posts

CentOS7 uninstall OpenJDK, and then install Oracle JDK
Centos7 uninstall openJdk, and install JDK1.8
Centos 7 install jdk and package service service
CentOS install openjdk 1.8
CentOS install jdk
Install centos7 and connect
CentOS7 install JDK8, tomcat8
Openjdk install on centos7
How to install jdk1.8.0_151 and mysql5.6.38 on centos7.2.1511
install oracle on centos
How to install and uninstall tomcat on centos
Centos 7 install JDK (Linux install jdk)
CentOS 7 install JAVA environment (JDK 1.8)
CentOs7.3 compile and install Nginx 1.9.9
CentOS 7 install Mono and MonoDevelop
Centos compile and install Git
Centos6.5 install and configure mongodb
Tencent Cloud Centos install jdk8
CentOS7 install python3 and pip3
Install Java JDK8 under CentOS6
CentOS7 install OracleJDK and JRE
CentOS6.5 install Java 8 and Tomcat8
CentOS6 install and crack Jira 7
CentOS6.5 install Java 8 and Tomcat8
Centos7 compile and install ntp-4.2.8p11
CentOS 6.9 compile and install python
CentOS6 install and crack confluence
CentOS 6 compile and install python 3
5.1. CentOS@ install JDK1.8 graphic tutorial
Ubuntu16.04 install and uninstall VMware-Workstation 14
CentOS6 install and crack Jira 7
Install and configure keepalived under CentOS 5.9
Install JDK8 in rpm on CentOS7
CentOS Yum compile and install MySQL 5.6
Minimal install JDK 1.8 tutorial in CentOS 7
CentOS8 install jdk8 / java8 tutorial (recommended)
Linux CentOS 7 install JDK detailed steps
CentOS 6.x compile and install Nginx
CentOS7 compile and install L(A|N)MP environment
CentOS7.3 install iptables and detailed use
CentOS quickly install Python3 and pip3
CentOS7 yum install and start mysql
CentOS 8 - install and configure NFS service
Centos7 and centos8 install mysql5.6 5.7 8.0 so simple
​Install Oracle database on CentOS Linux
Install and use docker under CentOS 6.8
CentOS7 install and use SQL Server
CentOS Minimal install and configure TIPS
Install Python3 and Py under CentOS7
Install and configure FreeIPA in Centos7
Linux CentOS6 compile and install Pyt
virtualBox install centos, and build tomcat
Install Mono 3.2 and Jexus 5.4 under CentOS 6.3
[Oracle] Manually install and uninstall Oracle, this is the most comprehensive one! !
Compile and install libmodbus library under CentOS7
CentOS7.5 source code compile and install mysql5.7.29
Centos7 compile and install MySQL8 problem record
Install Mono 2.10.8 and Jexus 5.0 under 32- and 64-bit CentOS 6.0
Install and uninstall CUDA and CUDNN on Ubuntu
1.5 Install Centos7
Compile and install nodejs and yum in Centos8