in a world where no one cares

Tomcat 6 with self-installed JDK

If you’re trying to install Tomcat 6 (or anything else with a dependency on Java) under Debian with a self-installed JDK (say, the Oracle Java 7 JDK) and you want to avoid apt-get grabbing OpenJDK, then your best bet is to use equivs to create a dummy package pretending to provide default-jre and default-jre-headless (and, if you feel like it, default-jdk). If you’re feeling particularly lazy (or are future me wishing he’d kept the resulting package around to reuse later – hello, future me!), here’s one I made earlier.

Edit 2013-12-16: This method hasn’t really worked for quite some time now, but that’s OK, as java-package has been updated to support Oracle Java 7. Along with satisfying the dependencies, it does a much better job of installing the JDK than most people will.

A note on Eclipse: Instead of depending on java-compiler like it ought, Eclipse depends on default-jdk, and more weirdly, on sun-java6-jdk. Even if you install Java using the above java-package method, you’ll still have to use an equivs package to provide those two dependencies if you want to keep OpenJDK off your system. Here’s a prebuilt package that provides just those two dependencies.

Write a Comment

Comment