Friday, March 26, 2010

HOWTO install Sun JDK for Ubuntu

I use:
1. Ubuntu 9.04
2. JDK 6 Update 18
3. "alexey" is my user name :)


1. Download JDK at
Platform - "Linux"
Cick "Continue"
Login for download - click "Skip this Step"
Click "jdk-6u18-linux-i586.bin"

2. Copy the downloaded file "jdk-6u18-linux-i586.bin" to the java folder

Chmod and run
chmod +x jdk-6u18-linux-i586.bin

If you have a problem with "Package libstdc++5 is not available"
create a symbolic link from to
:/usr/lib$ ln -s

Make linked directory

ln -s /home/alexey/java/jdk6 /home/alexey/java/jdk

Modified .bashrc file within your home folder with lines:

export JAVA_HOME=/home/alexey/java/jdk6/jdk
export PATH=$JAVA_HOME/bin:$PATH

To test write the command "java -version"

$ java -version
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Server VM (build 16.0-b13, mixed mode)

That's all.

No comments: