1--Check Java environment on your own computer with following command:
yum list installed |grep java
2-- Remove the already install java environment with the following commands:
yum -y remove java-1.8.0-openjdk*
yum -y remove java-1.7.0-openjdk*
3-- Check whether Java has already removed completely with the commands until it reports as this or 'no java in ...':
which java
4-- Download RPM package on the official website:
5-- Find the download installation package and install it with the command:
rpm -ivh jdk-11.0.13_linux-x64_bin.rpm
6-- Waiting for finishing the installation and check whether installed successfully.
7-- With the command:
which java
and it echoes the path of Java, which means it's ready to use!