Java SDK Installation on Ubuntu

Installing the Sun JDK on Ubuntu requires building your own .deb package for it. Thankfully, this is a simple process.

First, install the package building tools.


sudo apt-get install fakeroot java-package

Now download the binary from http://java.sun.com.

Finally, make a .deb package of the binary file. Do not run this command as root, the fakeroot tool builds the package as if by root. You'll need to be root when you install it.


fakeroot make-jpkg jdk-1_5_0_06-linux-i586.bin

Then install the package (as root).


sudo dpkg -i sun-j2sdk1.5_1.5.0+update06_i386.deb

Now we want to assign this installation of Java as the preferred one.


sudo update-alternatives --config java

Reply

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.

More information about formatting options