How to install Java SE Update 5 on Ubuntu 7.10

[WARNING: These instructions are right for the installation of the self-extracting binary file on the Linux x64 Platform]

1. Download the self-extracting binary file of Java SE Update 5 from the Sun web site. The file is jdk-6u5-linux-x64.bin.

2. Make sure that execute permissions are set on the self-extracting binary: run the command

chmod +x jdk-6u5-linux-x64.bin

3. Change directory to the location where you would like the files to be installed.

4. Run the self-extracting binary, executing it prepended by the path to it. If the file is in the current directory, prepend it with “./” (necessary if “.” is not in the PATH environment variable):

./jdk-6u5-linux-x64.bin

The binary code license is displayed, and you are prompted to agree to its terms.
The JDK files are installed in a directory called jdk1.6.0_05.

5. You have to check which is the number of your other Java alternatives on your Ubuntu installation to choose the number for the new Java Update 5 installation alternative. You can do this by typing

sudo update-alternatives --config java

without making any choice.

6. If your Java alternatives are, for example, from number 0 to number 3, then for your new Java Update 5 installation alternative you can choose 4 and add the alternative with this command (please, note the number 4 at the end of the command):

sudo update-alternatives --install /usr/bin/java java /yourJavaInstallationPath/jdk1.6.0_05/bin/java 4

7. Now you can choose the Update 5 as your Java alternative typing

sudo update-alternatives --config java

and choosing 4.

8. You can check that all goes right typing

java -version

Tag: , , , , ,

3 Risposte a “How to install Java SE Update 5 on Ubuntu 7.10”

  1. Giovanni Dice:

    Interessante non sapevo della possibilità di “forzare” la lista delle alternative
    update-alternatives –install. Sono un pò pigro con le pagine man… per recuperare segnalo la “synopsis” per la rimozione di una entry:
    –remove name path
    e nel caso dell’esempio:
    sudo update-alternatives –remove java /yourJavaInstallationPath/jdk1.6.0_05/bin/java

    GC

  2. jraffa Dice:

    grazie/thanks :-)

  3. Merike Dice:

    Thanks for the alternative setting part.

Lascia una Risposta