Tag Archives: ubuntu

Oracle Java 6 & Ubuntu

This is semi-draft, as I haven’t gotten around to testing the packages I build…

Caught out needing new “Sun” Java packages for Ubuntu, by the DLJ revocation?

Grab a usable set of build source packages from http://archive.canonical.com/ubuntu/pool/partner/s/sun-java6/ – you’ll need an *.orig.tar.gz, a *.dsc, and a *.debian.tar.gz file for the version you’ve picked. I used a 6.26 version from Natty.

Grab a latest (currently 6u30) “bin” Linux packages for each architecture from http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html (Note: needs Javascript!).

dpkg-source -x *.dsc
cd sun-java6-6.26/
rm *bin
mv ~/Downloads/jdk-6u30-linux-i586.bin jdk-6u30-dlj-linux-i586.bin
mv ~/Downloads/jdk-6u30-linux-x64.bin jdk-6u30-dlj-linux-amd64.bin

Edit debian/rules, comment out the section following the comment ‘check if the sources are the “same”‘.

dch -v 6.30

(add in a stub changelog entry – this is just so it realises what version it’s building)


cd ../sun-java6-6.30
dpkg-buildpackage -b -uc

Then you should be left with workable packages matching the last Ubuntu-released ones, but with a newer JRE/JDK.

Note #1: I haven’t so much as installed these packages, it’s just theory. It built, it ships – I mean, hey, it’s New Year’s Eve! ;-)
Note #2: This won’t include a working web plugin – I pulled the build packages from after 6.26-1natty1, which was the last release with a working web plugin.