Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

OCI: How to update OpenJDK Java version on Oracle Linux 7 or Later

in Linux 1 comment

Applies To:

Oracle Cloud Infrastructure - Version N/A and later

Linux OS - Version Oracle Linux 7.0 and later

Goal:

How to update OpenJDK Java version on Oracle Linux 7 or Later

Solution:

  • Ensure the yum repository or software source is enable to provide the OpenJDK version.
OL7: [ol7_latest]    or [ol7_latest-x86_64]
OL8: [ol8_appstream] or [ol8_appstream-x86_64]
OL9: [ol9_appstream] or [ol9_appstream-x86_64]
  • Install the desired OpenJDK version by running yum(8) or dnf(8). This will automatically cleanup the older version. Here is an example from OL7.
[root@Serverxx~]# yum install java-1.8.0-openjdk.x86_64    ## installs the latest version at that time

OR

[root@Serverxx~]# yum install java-1.8.0-openjdk-1.8.0.382.b05-1.el7_9.x86_64    ## installs that specific version
Loaded plugins: langpacks, osmsplugin, ulninfo
This system is receiving updates from OSMS.
Resolving Dependencies
--> Running transaction check
---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.262.b10-1.el7 will be updated
---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.382.b05-1.el7_9 will be an update
--> Processing Dependency: java-1.8.0-openjdk-headless(x86-64) = 1:1.8.0.382.b05-1.el7_9 for package: 1:java-1.8.0-openjdk-1.8.0.382.b05-1.el7_9.x86_64
--> Running transaction check
---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.262.b10-1.el7 will be updated
---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.382.b05-1.el7_9 will be an update
--> Finished Dependency Resolution

Dependencies Resolved
...
=============================================================================================================================================================
Package                                       Arch                 

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!