Sei sulla pagina 1di 2

Upgrading Java on Linux DATE Version AUTHOR DESCRIPTION 29 -Feb- 2012 1.

00 JMohlapamafsi

Initial

Upgrading java on Linux......................................................... ...............................................1) Installing the JDK on the system................................................ ...........................................2) Configuring the new version of Java............................................. ..........................................3) Switching to the new version of Java............................................ ..........................................4)

1) Upgrading Java on Linux Download the version of the jdk for which you want to upgrade your system w ith I this case , the self extractable 1.6.0_27 jdk version for Linux was download ed, jdk-6u27-Linux-i586-rpm.bin 2) Installing the jdk on the system Installation must be done as a root user Make sure you log on to the system as root and the root user has the execute per mission on the self extracting jdk files Execute the file using the command command below ./ jdk-6u27-Linux-i586-rpm.bin The behaviour of this command is shown in the screen below

3) Configuring the new version of Java The new version of jdk will automatically be installed in the directory /usr/jav a/jdk1.6.0_27 Use the Linux alternatives utility command to configure java Run the command below alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_27/bin/java 1 This command should just return a prompt if it java was configured properly The behaviour of this command is shown in the screen below

4) Switching to the new Java version The default java that is installed during OS installation is not uninstalled Basically there shall be two versions of java installed on the system and you ha ve option to run one version at a time To switch to the new java version execute the commands below alternatives --config java The system will display the current java versions installed on the system and pr ompt you to enter The number that maps to the version of java that you want to switch to or activate Verifying the version of java running on your system Execute the command below as any user on the Operating system java -version The behaviour of the commands for switching to the new java and verifying the cu rrent version of java is shown in the screen below

Potrebbero piacerti anche