Josm "Desktop API is not supported on the current platform" - any suggestions?

Debian 13, KDE, fresh install. Josm MOTD says “You are using version ‘19439’ of JOSM. Stable version: 19439 Development version: 19443”.

Clicking “report bug” gives

2025-10-16 13:14:28.951 INFO: POST https://josm.openstreetmap.de/josmticket (1.82 kB) ...
2025-10-16 13:14:29.160 INFO: POST https://josm.openstreetmap.de/josmticket -> HTTP/1.1 200 (70 ms)
2025-10-16 13:14:29.198 INFO: Opening URL: https://josm.openstreetmap.de/josmticket?pdata_stored=0c40eca5310f9840d8847ffc
2025-10-16 13:14:29.199 WARNING: java.lang.UnsupportedOperationException: The BROWSE action is not supported on the current platform!
java.lang.UnsupportedOperationException: The BROWSE action is not supported on the current platform!
        at java.desktop/java.awt.Desktop.checkActionSupport(Desktop.java:381)
        at java.desktop/java.awt.Desktop.browse(Desktop.java:531)
        at org.openstreetmap.josm.tools.PlatformHookUnixoid.openUrl(PlatformHookUnixoid.java:77)
        at org.openstreetmap.josm.tools.OpenBrowser.displayUrl(OpenBrowser.java:41)
        at org.openstreetmap.josm.tools.OpenBrowser.displayUrl(OpenBrowser.java:66)
        at org.openstreetmap.josm.gui.bugreport.DefaultBugReportSendingHandler.sendingBugReport(DefaultBugReportSendingHandler.java:30)
        at org.openstreetmap.josm.tools.bugreport.BugReportSender.run(BugReportSender.java:96)

(any attempt to do anything on the web, such as “web history” causes a similar message). java --version gives:

openjdk 21.0.8 2025-07-15
OpenJDK Runtime Environment (build 21.0.8+9-Debian-1)
OpenJDK 64-Bit Server VM (build 21.0.8+9-Debian-1, mixed mode, sharing)

https://stackoverflow.com/questions/18004150/desktop-api-is-not-supported-on-the-current-platform#18004334 is a slightly related question, and suggests kde-open; that is present.

I don’t know the exact cause of the problem, but as a workaround, you can change the list of the default order for browser.unix via the Advanced Preferences in JOSM. In this list, you can enter a working command at the top, such as firefox. By the way, the browser.unix entry only appears by default after you have clicked a link in JOSM and have not restarted JOSM afterwards. Otherwise, you would have to create the browser.unix entry manually.

The factory default order of browser.unix in JOSM is currently:

["#DESKTOP#",
 "xdg-open",
 "$BROWSER",
 "gnome-open",
 "kfmclient openURL",
 "firefox"]

After the change, it should for example look like this:

 ["firefox",
 "#DESKTOP#",
 "xdg-open",
 "$BROWSER",
 "gnome-open",
 "kfmclient openURL"]

Maybe xdg-open also works instead of firefox.

See also:
https://josm.openstreetmap.de/changeset/19143/josm

The alternative solution that’s presented in the answer uses kde-open, but I don’t think that’s what the standard java API uses.

Did you install josm from the debian repos or did you download it from the website? I assume the latter since the version that’s packaged in debian actually redirects you to the debian bugtracker instead of the josm one as seen in the log snippet.

I’ve never had that problem with the packaged version (debian testing since stable is too far behind).

https://stackoverflow.com/questions/33296555/how-to-find-which-libraries-does-java-desktop-api-require-on-linux suggests that the gvfs-backends package is required. Do you have that installed?