Open SamLukeYes opened 3 hours ago
Confirmed this behavior exists.
I suspect upstream might want this path to be configurable at runtime build-time, but a fix in Nixpkgs would be a simple subtituteInPlace
for the relevant file in postPatch
.
Confirmed this behavior exists.
I suspect upstream might want this path to be configurable at runtime, but a fix in Nixpkgs would be a simple
subtituteInPlace
for the relevant file inpostPatch
.
Thanks for the link. I searched the upstream bug tracker just now, and found a related issue: https://bugs.openjdk.org/browse/JDK-8325914
Describe the bug
Java programs using AWT TrayIcon cannot create tray icons on NixOS GNOME, due to the hard-coded
/usr/bin/gnome-shell
in private methodUNIXTookit.getGnomeShellMajorVersion
.Steps To Reproduce
Steps to reproduce the behavior:
javac
andjava
are in PATH, e.g. throughnix-shell -p jdk
SimpleTray.java
javac SimpleTray.java && java SimpleTray
Expected behavior
The Java program should print "true" in stdout, and a tray icon should show up until Ctrl+C is pressed.
Screenshots
Additional context
Tested on jdk11, jdk17 and jdk21, and this issue exists on all of them.
A workaround is to use an FHS env with
/usr/bin/gnome-shell
, e.g.Metadata
"x86_64-linux"
Linux 6.6.60, NixOS, 24.11 (Vicuna), 24.11pre-git
yes
yes
nix-env (Nix) 2.24.10
/etc/nix/inputs/nixpkgs
Notify maintainers
@NixOS/java
Note for maintainers: Please tag this issue in your PR.
Add a :+1: reaction to issues you find important.