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!

2 comments:

  1. Looks like something changed recently:

    Package sun-java6-jdk is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    E: Package sun-java6-jdk has no installation candidate

    ReplyDelete
  2. be honest... i am still surprised that is sun not oracle ... but it worked for me last few weeks all the time
    Which ubuntu u using ?
    10.04 LTS or 11.04 ?

    ReplyDelete