activityworkshop / GpsPrune

GpsPrune is a map-based application for viewing, editing and converting coordinate data from GPS systems.
GNU General Public License v2.0
67 stars 22 forks source link

[Question] Does it work on wayland? #101

Closed lamyergeier closed 1 month ago

lamyergeier commented 1 month ago

Fedora 40, Gnome 46, Wayland

$ java --version
openjdk 21.0.3 2024-04-16
OpenJDK Runtime Environment (Red_Hat-21.0.3.0.9-1) (build 21.0.3+9)
OpenJDK 64-Bit Server VM (Red_Hat-21.0.3.0.9-1) (build 21.0.3+9, mixed mode, sharing)
$ java -jar gpsprune_24.jar 
Exception in thread "main" java.awt.HeadlessException: 
No X11 DISPLAY variable was set,
or no headful library support was found,
but this program performed an operation which requires it,

        at java.desktop/java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:166)
        at java.desktop/java.awt.Window.<init>(Window.java:553)
        at java.desktop/java.awt.Frame.<init>(Frame.java:428)
        at java.desktop/javax.swing.JFrame.<init>(JFrame.java:224)
        at tim.prune.GpsPrune.launch(Unknown Source)
        at tim.prune.GpsPrune.main(Unknown Source)
activityworkshop commented 1 month ago

It should work, yes. On Debian + Gnome + Wayland (with OpenJdk17) it works fine.

A quick search brings up this link, maybe it helps? https://discussion.fedoraproject.org/t/cannot-run-java-jar-file-in-wayland-only-fedora-40/111814

It sounds like that person only had the minimal "headless" package of openjdk installed, and not the whole jre.