Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.java > #12625

Re: Packaging applications with JVM version restrictions

From Thorsten Glaser <t.glaser@tarent.de>
Newsgroups linux.debian.maint.java
Subject Re: Packaging applications with JVM version restrictions
Date 2023-04-17 22:00 +0200
Message-ID <GlDb3-2HnB-1@gated-at.bofh.it> (permalink)
References <GlD1n-2Hkw-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 17 Apr 2023, Rob Browning wrote:

>Is there Is there a policy or preferred way to handle a package that
>needs a particular version or versions of java?  e.g. say it doesn't
>work with < 9.

From a Depends standpoint, java9-runtime-headless or java9-runtime. But…

>I could imagine it might not want to just rely on /usr/bin/java because
>you might not want it to break if the system has 8 and 11 installed, and
>then the local admin changes the default to 8 via update-alternatives.

… this is, indeed, possible: the Depends simply means it’s present,
not the default. (And that is a good thing.)

>To avoid that, I imagine the application's /usr/bin/something could
>examine $(update-alternatives --list java) to find a suitable version,
>but is that reasonable, or is there a preferable approach?

I’m a bit wary of auto-selecting something. I’d instead check whether
${JAVA:-java} has the right version and complain when not. Possibly
check whether $JAVA_HOME is set (which it isn’t in a regular Debian
one-JRE installation) and use that if suitable instead of complaining.
(Where complaining means echo "E: some msg" >&2; exit 1)

bye,
//mirabilos
-- 
Infrastrukturexperte • tarent solutions GmbH
Am Dickobskreuz 10, D-53121 Bonn • http://www.tarent.de/
Telephon +49 228 54881-393 • Fax: +49 228 54881-235
HRB AG Bonn 5168 • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

                        ****************************************************
/⁀\ The UTF-8 Ribbon
╲ ╱ Campaign against      Mit dem tarent-Newsletter nichts mehr verpassen:
 ╳  HTML eMail! Also,     https://www.tarent.de/newsletter
╱ ╲ header encryption!
                        ****************************************************

Back to linux.debian.maint.java | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Packaging applications with JVM version restrictions Rob Browning <rlb@defaultvalue.org> - 2023-04-17 21:50 +0200
  Re: Packaging applications with JVM version restrictions Thorsten Glaser <t.glaser@tarent.de> - 2023-04-17 22:00 +0200
    Re: Packaging applications with JVM version restrictions Loïc Rouchon <loic@loicrouchon.com> - 2023-04-18 15:30 +0200
      Re: Packaging applications with JVM version restrictions Thorsten Glaser <t.glaser@tarent.de> - 2023-04-19 09:20 +0200
        Re: Packaging applications with JVM version restrictions Loïc Rouchon <loic@loicrouchon.com> - 2023-04-19 12:10 +0200
          Re: Packaging applications with JVM version restrictions gregor herrmann <gregoa@debian.org> - 2023-04-20 20:00 +0200
            Re: Packaging applications with JVM version restrictions Loïc Rouchon <loic@loicrouchon.com> - 2023-05-06 15:40 +0200

csiph-web