Reply to comment

Installing Java 2 on Debian, The Debian Way

I can never remember how to install Java on Debian, so here's my version on how to do it the Debian Way (TM).

Download the Sun Java 2 Runtime environment or Development Kit from Sun's Java site. The file you download should have a ".bin" extension. Then install:

apt-get install java-package fakeroot

java-package is a set of Debian scripts for creating your own Debian-ized Java package. fakeroot lets you run certain programs as root, such as the Debian package creation process. After these are installed, run:

fakeroot make-jpkg jdk-*.bin
sudo dpkg -i sun-j2sdk*.deb

The first creates a Debian package from the Sun binary installer, while the second installs the created Debian package.

This will fulfill all Java dependencies in Debian, something you would not get if you installed Java via some other method. It's also the "official" Java, as opposed to using something like Blackdown, and makes you less reliant on having to rely on other people for packaging. For example, I used this to create my own AMD64 64-bit Java package.

Trackback URL for this post:

http://samat.org/trackback/60

Reply

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Insert Flickr images: [flickr-photo:id=230452326,size=s] or [flickr-photoset:id=72157594262419167,size=m].
  • You may use [inline:xx] tags to display uploaded files or images inline.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.

More information about formatting options