This is a record when I make OpenJDK 1.8.0 default version in AWS EC2.
Procedure
Install OpenJDK 1.8.0
First, I installed OpenJDK 1.8.0.
|
sudo yum install java-1.8.0-openjdk |
Change default version
As the following, I changed the default Java version.
|
$ sudo /usr/sbin/alternatives --config java There are 2 programs which provide 'java'. Selection Command ----------------------------------------------- *+ 1 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java 2 /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java Enter to keep the current selection[+], or type selection number: 2(Enter) |
Confirmation
I confirmed that I changed the version by executing java -version
.
|
$ java -version openjdk version "1.8.0_101" OpenJDK Runtime Environment (build 1.8.0_101-b13) OpenJDK 64-Bit Server VM (build 25.101-b13, mixed mode) |
A Life Summary of an Gypsy