On 23 August 2017 at 21:43, Thorsten Glaser <t.gla...@tarent.de> wrote: > On Wed, 23 Aug 2017, Carnë Draug wrote: > >> However, java<N>-runtime packages are virtual packages provided by >> default-jre so I don't understand why. Could anyone clarify? > > They are also provided by openjdk-*-jre, so you can, for example, > install a package depending on java6-runtime on wheezy (pre-LTS) > whose default-jre pulled in openjdk-6-jre but run it with > openjdk-7-jre instead of that. Or even openjdk-8-jre backported > yourself. > > That’s extremely useful. It’s best to have at most *one* JRE > on any given Debian system, after all. Experience speaking. > > bye, > //mirabilos
Hi Thank you for the answer but I still don't understand. I get how the use of virtual packages for java<N>-runtime allows one to choose OpenJDK or Oracle JDK. What I don't understand is the default-jre *and* java<N>-runtime. Actually, I don't understand the default-jre at all if one also needs to specify a minimum java version via java<N>-runtime. Using your example, installing a package on wheezy that is dependent on default-jre and java6-runtime allows one to use openjdk-7-jre instead (I guess wheezy default-jre was once openjdk-6-jre). However, being dependent on java6-runtime alone would suffice since openjdk-7-jre would also provide it. The extra dependency on default-jre would only add openjdk-6-runtime which was not actually necessary. I'm probably missing something important on how the java alternatives and jre's work. I'm packaging a java program now (been doing some work on the imagej package for debian-med), I would like to understand this properly. Thank you Carnë