Introduced global cache folder ~/.josm/cache (see [4810], [4812], [4813]).
~/.josm/cache
You can write a run script that makes JOSM use the XDG folders.
Example:
java -Djosm.home=$XDG_CONFIG_HOME -Djosm.cache=$XDG_CACHE_HOME -jar josm.jar
TODO: user data in a separate folder ($XDG_DATA_HOME)
$XDG_DATA_HOME