You are not logged in.

#1 2025-01-02 21:53:54

vEnhance
Member
Registered: 2021-11-28
Posts: 9
Website

[solved] Is Java packaging responsible for checking the Java version?

I had an issue with launching a package that needed a non-headless java-runtime. I was eventually able to fix it, but post here because I wanted advice on whether this should be considered user error on my part, or whether this constitutes a packaging bug that should be reported.

The package in question is extra/geogebra, which is a graphical Java application, hence requires `java-runtime`. The problem is that if there's both a headless version of Java installed together with some other version of Java fulfilling the `java-runtime` dependency, and the headless version is the system default, then GeoGebra will crash. In other words, the steps to reproduce are:

sudo pacman -S jre11-openjdk jre-openjdk-headless
sudo archlinux-java set java-23-openjdk
sudo pacman -S geogebra
geogebra

Then GeoGebra will simply crash with status code 10 (and no further error message).

Of course, written this way it's obvious what the issue is. However, in practice this came up when JRE 11 + 23 headless were installed on my system years ago for other reasons, then recently when running `pacman -S geogebra` the application simply crashed and it took me a long time to figure out the issue. So the question basically comes down to: is the launcher provided by the packager responsible for checking that the selected Java version is the one required by the package dependencies (by launcher, I mean this file), or is it the user's responsibility to be keeping in mind the active version of `archlinux-java` for any application requiring Java?

I've read through the ArchWiki Java page and Java packaging guidelines to see if this was addressed anywhere, and searched the forums for keywords like "archlinux-java headless" and similar, but didn't find anything. I also tried looking at other packages that required `java-runtime` to see if any of them have some sort of logic for this, but didn't find any such examples.

Thanks for your attention.

Last edited by vEnhance (2025-01-02 22:25:25)


~ Evan Chen

Offline

#2 2025-01-02 22:00:57

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,726

Re: [solved] Is Java packaging responsible for checking the Java version?

That's not something that can be handled in packaging at this point.

Offline

#3 2025-01-02 22:25:04

vEnhance
Member
Registered: 2021-11-28
Posts: 9
Website

Re: [solved] Is Java packaging responsible for checking the Java version?

Gotcha, thanks. If it's not possible at all to handle it in packaging I guess there's no point in opening something in the issue tracker.

Appreciate the response. I'll mark thread as solved.


~ Evan Chen

Offline

Board footer

Powered by FluxBB