Here is the error:
$ josm
Unrecognized option: --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
I also installed the Flatpak version, which works as intended.
Just for the sake of checking your issue
sudo pacman -Syu josm
Cannot reproduce the issue
$ josm
2022-06-12 14:12:37.837 INFO: Log level is at INFO (INFO, 800)
2022-06-12 14:12:37.876 INFO: Missing preference file '/home/fh/.config/JOSM/preferences.xml'. Creating a default preference file.
2022-06-12 14:12:39.775 INFO: GET https://josm.openstreetmap.de/wiki/StartupPage -> HTTP/1.1 200 (321 ms)
2022-06-12 14:12:39.932 INFO: GET https://josm.openstreetmap.de/remote/geofabrik-index-v1-nogeom.json -> HTTP/1.1 200 (29 ms; 25,7 kB)
2022-06-12 14:12:40.039 INFO: Obtained 82 Tag2Link rules from resource://META-INF/resources/webjars/tag2link/2021.3.21/index.json
2022-06-12 14:12:40.092 INFO: GET https://josm.openstreetmap.de/maps -> HTTP/1.1 200 (39 ms)
2022-06-12 14:12:40.150 INFO: GET https://api.openstreetmap.org/api/capabilities -> HTTP/1.1 200 (119 ms; 424 B)
2022-06-12 14:12:40.150 INFO: OK
2022-06-12 14:12:41.841 INFO: Changeset updater active (checks every 60 minutes if open changesets have been closed)
2022-06-12 14:13:33.488 INFO: Changeset updater inactive