Installing OpenJDK 8 on RHEL-based Systems
Procedure:
Step-1 :Install the OpenJDK 8:
su -c "yum install java-1.8.0-openjdk"
Step-2 :If you have more than one Java version installed on your system use the following command to switch versions:
sudo alternatives --config java
Step-3 Make sure your system is using the correct JDK:
java -version
openjdk version "1.8.0_71"
OpenJDK Runtime Environment (build 1.8.0_71-b15)
OpenJDK 64-Bit Server VM (build 25.71-b15, mixed mode)
Output on Terminal:
Step-1
[root@dev1 ~]# su -c "yum install java-1.8.0-openjdk"
Loaded plugins: fastestmirror
Determining fastest mirrors
epel/x86_64/metalink | 11 kB 00:00:00
* base: mirrors.advancedhosters.com
* epel: reflector.westga.edu
* extras: mirrors.advancedhosters.com
* updates: mirrors.advancedhosters.com
base | 3.6 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 3.4 kB 00:00:00
google-cloud-compute/signature | 454 B 00:00:00
.
.
.
.
.
Transaction Summary
=============================================================================================================================================================================================
Install 1 Package (+64 Dependent packages)
Total download size: 45 M
Installed size: 146 M
Is this ok [y/d/N]: y
Step-2
[root@dev1 ~]# sudo alternatives --config java
There is 1 program that provides 'java'.
Selection Command
-----------------------------------------------
*+ 1 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el7_6.x86_64/jre/bin/java)
Enter to keep the current selection[+], or type selection number: 1
Step-3
[root@dev1 ~]# java -version
openjdk version "1.8.0_201"
OpenJDK Runtime Environment (build 1.8.0_201-b09)
OpenJDK 64-Bit Server VM (build 25.201-b09, mixed mode)
Procedure:
Step-1 :Install the OpenJDK 8:
su -c "yum install java-1.8.0-openjdk"
Step-2 :If you have more than one Java version installed on your system use the following command to switch versions:
sudo alternatives --config java
Step-3 Make sure your system is using the correct JDK:
java -version
openjdk version "1.8.0_71"
OpenJDK Runtime Environment (build 1.8.0_71-b15)
OpenJDK 64-Bit Server VM (build 25.71-b15, mixed mode)
Output on Terminal:
Step-1
[root@dev1 ~]# su -c "yum install java-1.8.0-openjdk"
Loaded plugins: fastestmirror
Determining fastest mirrors
epel/x86_64/metalink | 11 kB 00:00:00
* base: mirrors.advancedhosters.com
* epel: reflector.westga.edu
* extras: mirrors.advancedhosters.com
* updates: mirrors.advancedhosters.com
base | 3.6 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 3.4 kB 00:00:00
google-cloud-compute/signature | 454 B 00:00:00
.
.
.
.
.
Transaction Summary
=============================================================================================================================================================================================
Install 1 Package (+64 Dependent packages)
Total download size: 45 M
Installed size: 146 M
Is this ok [y/d/N]: y
Step-2
[root@dev1 ~]# sudo alternatives --config java
There is 1 program that provides 'java'.
Selection Command
-----------------------------------------------
*+ 1 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el7_6.x86_64/jre/bin/java)
Enter to keep the current selection[+], or type selection number: 1
Step-3
[root@dev1 ~]# java -version
openjdk version "1.8.0_201"
OpenJDK Runtime Environment (build 1.8.0_201-b09)
OpenJDK 64-Bit Server VM (build 25.201-b09, mixed mode)
No comments:
Post a Comment