Creating a Debian Package of the Oracle Java SDK

Note to Bright Staff

You probably don't need to make these debs yourself, you can use the ready-made ones in work/Asset Bank/Development/Software/Debian/. It may not be possible to distribute these outside the company though for licensing reasons so look into licensing before you do so.

Set up VM

Although these instructions produce packages compatible with Debian 5.0 Lenny and 6.0 Squeeze, the package itself can only be built on Debian 7.0 Wheezy (the testing distribution at the time of writing).

You need to use a 32-bit VM to produce 32-bit packages or a 64-bit VM to produce 64-bit packages.

Download a netinst image from and use it to install a VM.

Install java-package

Make sure that contrib is enabled in /etc/apt/sources.list:

deb wheezy main contrib
deb-src wheezy main contrib

deb wheezy/updates main contrib
deb-src wheezy/updates main contrib

Update apt's package list and install java-package:

apt-get update
apt-get install java-package 

Download Oracle Java SDK

Download the .tar.gz from . Choose the Linux x86 or Linux x64 version depending on whether your server is running 32-bit or 64-bit GNU/Linux.

Convert it to a Debian package. This must be done as a non-root user. Note that java-package uses the filename to recognise the version of Java, so if your file doesn't end in .tar.gz (for example because your web browser changed it) then you must rename it before running java-package (see /usr/share/java-package/ for more details on what filename patterns java-package recognises as Oracle Java SDKs):

mv jdk-7u17-linux-x64.gz jdk-7u17-linux-x64.tar.gz
make-jpkg jdk-7u17-linux-x64.tar.gz 

You will be asked a couple of questions, then lots of things will scroll past and finally a .deb should be written to the current directory named something like oracle-j2sdk1.7_1.7.0+update17_amd64.deb. This can be installed by running the following command as root:

dpkg -i oracle-j2sdk1.7_1.7.0+update17_amd64.deb 

Was this article helpful?

Yes No

Thanks for your feedback!

Stew, Professional Services

“With so many settings available, and such a flexible system, do not hesitate to get in touch with one of our knowledgeable consultants to help you configure your Asset Bank.” Stewart, Professional Services