﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
23698	Allow passing Java arguments to the flatpak build	3paicl	team	"Flatpak build 19067 from flathub

On https://josm.openstreetmap.de/wiki/Help/Preferences there are instructions that may be required for optimal usage of JOSM.

The flatpak build on Flathub (which lists this project as the owners) does not allow passing java -D arguments. All arguments are passed as josm file arguments, it seems. As a result, the user cannot apply this instructions on the mentioned page: 


{{{
-Djosm.dir.name=JOSM-dev
}}}


When running {{{flatpak run org.openstreetmap.josm -Djosm.dir.name=JOSM-dev}}}
The output is: ""JOSM: unrecognised option '-Djosm.dir.name'""


That is explained by the wrapper in /app/bin/josm. This wrapper inside the flatpak container does this:


{{{
        $JAVACMD $JAVA_OPTS -jar ""${JOSM_PATH}"" ""$@""

}}}


Proposed solution: Parse better the arguments that are given. Arguments starting with '-D' could easily be detected and added to $JAVA_OPTS with a bit of extra shell code in the wrapper. Valid arguments for josm itself could be passed to josm.
"	defect	closed	normal		Core		othersoftware	19067 flatpak	
