Tag Archives: jre

How to install Java 6 on CentOS 6.2

First, we will check that java is already install or not on our system?

java -version

As, we can see that the java is not install on our system, so we will downloads the Java binary installer from Oracle. (In this example, we will download & install the jdk, but the procedure is exactly the same for jre).

Transfer the downloaded file (jdk-6u32***) to the CentOS from Windows machine using WinSCP.

Now, move to the directory where you copy the jdk file(in my case, it is in tmp directory) and give execute permission to jdk file:

cd /tmp/
sudo chmod +x jdk-6u32-linux-x64-rpm.bin

Run the jdk file:

sudo ./jdk-6u32-linux-x64-rpm.bin

Apply the alternatives:

sudo alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_32/bin/java 17000 

We are done 🙂

Check the installed version of java:

java -version

 

Hope this will help you!

 

Please Remember me in your prayers!



Advertisements

How to install Java 6 on Ubuntu 12.04

First, we will check that java is already install or not on our system:

java -version

As, we can see that the java is not install on our system, so we will downloads the Java binary installer from Oracle. (In this example, we will download & install the jre, but the procedure is exactly the same for jdk).

Transfer the downloaded file (jre-6u31***) to the Ubuntu from Windows machine using WinSCP.

Now, move to the directory where you copy the jre file(in my case, it is in tmp directory)

cd /tmp/

Give execute permission to jre file.

sudo chmod +x jre-6u31-linux-x64.bin

Run the jre file.

sudo ./jre-6u31-linux-x64.bin

After execution, it makes a new directory in the same location where jre file reside.

Move this newly created directory to /usr/lib/jvm/

sudo mv jre1.6.0_31 /usr/lib/jvm/

Enter this command:

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.6.0_31/bin/java" 1

We are done!

Check the installed version of java.

java -version

Confirmation (Optional 🙂 ):

Here is a confirmation that we successfully installed the java on Ubuntu 12.04.

Hope this will help you!

Please Remember me in your prayers!

%d bloggers like this: