Este contenido no está disponible en el idioma seleccionado.

Chapter 4. Updating Red Hat build of OpenJDK 11 on RHEL


The following sections provide instructions for updating Red Hat build of OpenJDK 11 on RHEL.

4.1. Updating Red Hat build of OpenJDK 11 on RHEL by using yum

The installed Red Hat build of OpenJDK packages can be updated by using the yum system package manager.

Prerequisites

  • You must have root privileges on the system.

Procedure

  1. Check the current Red Hat build of OpenJDK version:

    $ sudo yum list installed "java*"
    Copy to Clipboard Toggle word wrap

    A list of installed Red Hat build of OpenJDK packages displays.

    Installed Packages
    
    java-1.8.0-openjdk.x86_64   1:1.8.0.322.b06-2.el8_5    @rhel-8-for-x86_64-appstream-rpms
    java-11-openjdk.x86_64    1:11.0.14.0.9-2.el8_5    @rhel-8-for-x86_64-appstream-rpms
    java-17-openjdk.x86_64    1:17.0.2.0.8-4.el8_5    @rhel-8-for-x86_64-appstream-rpms
    Copy to Clipboard Toggle word wrap
  2. Update a specific package. For example:

    $ sudo yum update java-11-openjdk
    Copy to Clipboard Toggle word wrap
  3. Verify that the update worked by checking the current Red Hat build of OpenJDK versions:

    $ java -version
    
    openjdk version "11.0.14" 2022-01-18 LTS
    OpenJDK Runtime Environment 18.9 (build 11.0.14+9-LTS)
    OpenJDK 64-Bit Server VM 18.9 (build 11.0.14+9-LTS, mixed mode, sharing)
    Copy to Clipboard Toggle word wrap
    Note

    If the output from the previous command shows that you have a different major version of Red Hat build of OpenJDK checked out on your system, you can enter the following command in your CLI to switch your system to use Red Hat build of OpenJDK 11:

    $ sudo update-alternatives --config 'java'
    Copy to Clipboard Toggle word wrap

You can update Red Hat build of OpenJDK by using the archive. This is useful if the Red Hat build of OpenJDK administrator does not have root privileges.

Prerequisites

  • Know the generic path pointing to your JDK or JRE installation. For example, ~/jdks/java-11

Procedure

  1. Remove the existing symbolic link of the generic path to your JDK or JRE.

    For example:

    $ unlink ~/jdks/java-11
    Copy to Clipboard Toggle word wrap
  2. Install the latest version of the JDK or JRE in your installation location.

Revised on 2024-05-09 16:48:57 UTC

Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat