De-failing the make-jpkg install of Oracle Java 7 JRE on Debian Wheezy (Aug 2013)

So, any surprise this is a clusterf*ck?

Debian has removed Oracle Java from non-free and required the use of java-package to build .debs from Oracle’s binary distributions. More power to ’em; Oracle is considered evil for many good reasons. But, if you do need to taint your system with Oracle’s devilry — and there are plenty of Java apps that say “use the open source Java alternatives at your own risk and tears” — installing it involves dark arts.  Read on.

Update 28 March 2014:  This does not work for Java 8 yet.  Unless you really need Java 8 and you’re sure about that, just install Java 7.  Most applications don’t need Java 8 yet and won’t for a while.  I’ll come back and post a link to an updated guide once I figure it out (and I have to, for reasons).


First (updated 25 March 2014) you’ll need to install the java-package package. I was informed and subsequently confirmed that this package will not be found unless contrib is present in your /etc/apt/sources.list line, e.g.

deb wheezy main contrib

Once you make sure contrib is in /etc/apt/sources.list, you can go ahead and install java-package:

# aptitude install java-package

Then, download the Java “tarball” from Oracle’s Download Page, straight outta 2004:

When I did this, I downloaded what the site claimed was jre-7u25-linux-x64.tar.gz.

Once downloaded in my browser — doing so seems impossible in lynx and with wget, at least easily, so I had to download it to my desktop and scp it to my server, awesome, thanks for that — I actually got a file named jre-7u25-linux-x64.gz.

Upon observing that, you might think “that’s a gzip file, maybe wrapping one of those .bin files some of the java-package docs were mentioning.” Nope! It’s a bare tar file but with a .gz extension.  Not even .tar.gz, but .gz.

So, upon figuring that out, you’d gzip it — make-jpkg really expects a gzipped tarball — and re-run make-jpkg.

Nope!!! ‘This does not look like a tar archive.’ So not only did Oracle mislabel the freaking file twice, but whatever XSLT that told their Solaris tar how to pack the archive was clearly borked. (That’s a Solaris joke.)


tar xvf jre-7u25-linux-x64.gz
tar cvzf jre-7u25-linux-x64.tar.gz jre1.7.0_25 # make a readable tarball
fakeroot make-jpkg jre-7u25-linux-x64.tar.gz



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: