Este conteúdo não está disponível no idioma selecionado.

Chapter 4. Updating Red Hat build of OpenJDK 17 on Red Hat Enterprise Linux


The following sections provide instructions for updating Red Hat build of OpenJDK 17 on Red Hat Enterprise Linux.

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

You can update the installed Red Hat build of OpenJDK packages 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*"

    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
  2. Update a specific package. For example:

    $ sudo yum update java-17-openjdk
  3. Verify that the update worked by checking the current Red Hat build of OpenJDK versions:

    $ java -version
    
    openjdk version "17.0.2" 2022-01-18 LTS
    OpenJDK Runtime Environment 21.9 (build 17.0.2+8-LTS)
    OpenJDK 64-Bit Server VM 21.9 (build 17.0.2+8-LTS, mixed mode, sharing)
    Note

    You can install multiple major versions of Red Hat build of OpenJDK on your local system. If you need to switch from one major version to another major version, issue the following command in your command-line interface (CLI) and then follow the onscreen prompts:

    $ sudo update-alternatives --config 'java'

4.2. Updating Red Hat build of OpenJDK 17 on RHEL by using an archive

You can update Red Hat build of OpenJDK by using an archive file. 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-17

Procedure

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

    For example:

    $ unlink ~/jdks/java-17
  2. Install the latest version of the JDK or JRE in your installation location.

Revised on 2024-10-29 18:38:39 UTC

Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2026 Red Hat
Voltar ao topo