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).
PROCESS AND PROBLEMS:
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 http://http.debian.net/debian/ wheezy main contrib
Once you make sure
contrib is in
/etc/apt/sources.list, you can go ahead and install
# aptitude install java-package
Then, download the Java “tarball” from Oracle’s Download Page, straight outta 2004: http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
When I did this, I downloaded what the site claimed was
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
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
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