Procedure when you want to change the java version on centOS. It's a memo for myself because I check it every time.
What is written is almost the same as the following article. I was allowed to reference. Thank you very much. https://qiita.com/Sa2/items/8ba501294df745be8c78 https://qiita.com/hajimeni/items/67d9e9b0d169bf68d1c9
Environment implemented this time ･ CentOS release 6.9 (Final) Java I want to drop this time ･ Java1.8.x
Check the installed java version.
Remove the installed java.
yum remove java-1.6.0-openjdk
#### **`yum remove java-1.7.0-openjdk`**
If you delete it
java -version bash: /usr/bin/java:There is no such file or directory
Click the download button for the version you want from the following page http://www.oracle.com/technetwork/java/javase/downloads/index.html
Check the radio button of Accept License Agreement, Right-click the file you want to drop → copy the link address
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" <Copyed address>
rpm -ivh xxx.rpm
Verification ```java -version``` #### **`java version "1.8.0_151"`**