.deb package for Ubuntu: correct Java dependency
I'm currently in the progress of creating a .deb
package of our Java-based application, especially for Ubuntu users. Our application runs with the JRE 1.6 and 1.7 from OpenJDK (openjdk-6-jre-headless
and openjdk-7-jre-headless
), but the use of JRE 1.7 is preferred. Because of that, I'm using
Recommends: openjdk-7-jre-headless
but I'm unsure whether this is the correct dependency. When installing our bundle and neither openjdk-6-jre-headless
nor openjdk-7-jre-headless
is installed, it should install openjdk-7-jre-headless
.
You should depend upon java-runtime-headless (>= 1.6)
(which is filled by openjdk-7-jre-headless
, and allows any 1.6 or newer JRE that the user has installed to work).
This allows for much more flexibility. For example, I run oracle-java8-jdk
on my system; this provides default-jre-headless 1.8
(as well as java7-runtime-headless
, java6-runtime-headless
, and java5-runtime-headless
), but any dependencies upon openjdk
would most likely result in me not installing your program because I have no desire to install an older JRE.