How to updated java version?

Nirjonadda

Well-Known Member
May 8, 2013
724
27
78
cPanel Access Level
Root Administrator
Please let me know that How to updated java version to 8 or 9? I see my java version is 1.8.0

Code:
[[email protected] ~]# java -version
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (build 1.8.0_161-b14)
OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)
[[email protected] ~]#
But we need update to 9.0.4 example below.

Code:
java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)