Hi Gregor, >From what I've seen of the java-wrappers package, it seems to solve the problem in a single direction: specifying the minimum JVM's version, but not the maximum.
That was one of the remark of Thorsten to me. The more I think about it, the more I think it is not a problem which should be solved by Debian. Nor by Fedora, Nor by Homebrew, ... I'd like to have a solution that is common for all systems/platform to ease the packaging of java applications. So I started a prototype of a program that would choose a JVM based on criteria like the minimum/maximum java specification version, the vendor of the JVM, the capabilities of the JVM (java, javac, javap, native-image, ...) It would consist of two steps: - JVMs discovery - JVM selection I would typically expect the paths/environment variables to use for the discovery to be OS/package managers specific. For Debian, it could be /usr/bin/java, /usr/lib/jvm, $JAVA_HOME. Rules could be specified at system level to say for example: use a JVM in the [11, 17] range. Those rules could be overridden on a per program basis. Here is the prototype: https://github.com/loicrouchon/jvm-finder/tree/main#readme It's written in Go so that the JVM selection is quite fast. I'm more of a Java developer, so probably not great Go, but I'll improve it over time. I do not expect any of you to help me with the implementation, but feel free ;) However, I would love you to contribute to the requirements of such a program. Because I have the point of view of someone wanting to distribute a Java program. But I lack the point of view of distributions/packages maintainers PS: I'll be at Devoxx UK next week and will try to discuss of this topic with other Java developers. Regards, ------- Original Message ------- On Thursday, April 20th, 2023 at 19:29, gregor herrmann <gre...@debian.org> wrote: > > > On Wed, 19 Apr 2023 09:48:54 +0000, Loïc Rouchon wrote: > > > Debian would need to provide a way to perform the "JRE with exact java > > $version exists" > > check. This could be done by providing stable symlinks, or alternatives like > > /etc/alternatives/jre_<VERSION> > > > (I haven't read the complete thread in detail, so this might be not > completely appropriate): > > There's also the java-wrappers package which helps to find java > runtimes from shell wrapper scripts. > > > Cheers, > gregor > > -- > .''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org > : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06` > . `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe` -