22 September 2011

How to install sun java on ubuntu server?

Solution for Java 6 jdk on Ubuntu Server 10.04LTS (and ubuntu server 11.04) but it will works more less for other versions

To install SUN Java JDK

  1. 1)modify sources.list in /etc/apt/sources.list by uncomment below 2 lines
    deb http://archive.canonical.com/ubuntu lucid partner
    deb-src http://archive.canonical.com/ubuntu lucid partner

    (it works for 10.04 LTS for other version change lucid for natty(11.04) and similar for other versions of ubuntu
    to modfiy file you can:
        a) use accient vi or nano (btw. if you use nano to save file press ... ctrl+o and to quite press ctrl+x)
        b) If you have installed add-apt-repository then you can type sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
  2. then type sudo apt-get update
  3. sudo apt-get install sun-java6-jdk
     (during install press Y to confirm that you extremly happy that java will use WHOLE 183mb on your mighty hdd, confirm licence
 DONE!