I ran into this issue on my 4K screen where the flatpack version of JOSM would scale and the version I downloaded from their recommended repository wouldn't scale.
I was able to change the scaling of JOSM if I ran GPK_SCALING=2 josm
from the command line. But I wanted to be able to not have to start my application from the command line. On Ubuntu 22.04 was able to resolve my issue by adding the following to /etc/default/josm
:
JAVA_OPTS="-Dsun.java2d.uiScale=2"