Thursday, April 23, 2009

Install java SDK on linux

Download the bin file from the java website:

Install the package as root:

su - root

Change the execute rights:

chmod 700 jdk_*.bin

Execute the bin:


Java will be installed in /usr/java/

export JAVA_HOME=/usr/java/jdk...
export PATH=$JAVA_HOME/bin:$PATH

Now you can check if everthing is ok by:
which java
java -version

Did this post help you in any way can you please leave a comment? This will motivate me writing more posts.


  1. or, with just one command, no manual downloading:

    sudo apt-get install sun-java6-jdk

  2. Well done Dude. Blogs like these really helps