Questo contenuto non è disponibile nella lingua selezionata.

2.3.3. Installation Procedures


Procedure 2.2. Installing Java

Follow this procedure to install and set up a supported Java version:
  1. Subscribe your system to the appropriate channel:
    • Red Hat Enterprise Linux Server Supplementary for Red Hat Enterprise Linux 6
    • Red Hat Enterprise Linux Supplementary for Red Hat Enterprise Linux 5
  2. On the command line, as the root user run the command to install Java 1.6 or 1.7:
    • On Red Hat Enterprise Linux 5 and Red Hat Enterprise Linux 6, execute the yum install command to install Java 1.6:
      # yum install java-1.6.0-<VENDOR>-devel
      Copy to Clipboard Toggle word wrap
      Execute the following variation of the listed command to install Java 1.7:
      # yum install java-1.7.0-<VENDOR>-devel
      Copy to Clipboard Toggle word wrap
      Substitute <VENDOR> with sun, ibm, or openjdk.
  3. Run the following commands as the root user (if switching from another user, make sure to run the command su -) to make sure the correct JDK is in use:
    # alternatives --config java
    Copy to Clipboard Toggle word wrap
    # alternatives --config javac
    Copy to Clipboard Toggle word wrap
    These commands return lists of available JDK versions with the version in use marked with a plus (+) sign. If the set JDK is not the desired option, switch to the right JDK as instructed on the command line.

    Important

    Any software that makes use of the java and javac commands is using the JDK set by alternatives. Switching java alternatives may negatively influence running of such software.
  4. Install the required packages (refer to Procedure 2.1, “Installing Required Packages”)
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat