Install Sun Java JDK on Ubuntu

These instructions were executed on Ubuntu 10.10 running atop a 32-bit machine.

1.  Download the latest JDK here.

2.  Move the binary file to your directory of choice. The consensus from various sources seems to be /usr/local though you can put it anywhere and the PATH variable will be modified accordingly.

3.  Change the permission to allow execution.

chmod a+x jdk-6u24-linux-i586.bin

Note: The name of the binary may be different for you. You must use sudo to move the binary into /usr/local and for the following step.

4.  Add the path of the java executable (in this case /usr/local/jdk1.6.0_24/bin) to your PATH variable by modifying /etc/environment. Remember to separate entries within the variable with a colon and to log off to allow the change to take effect.

5.  To test if everything has worked out, simply go to another directory and type “java -version”. You should see the following:

java version “1.6.0_24”
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)

Advertisements

2 thoughts on “Install Sun Java JDK on Ubuntu

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s