josm -V (return code: -15)
Using /usr/lib/jvm/java-9-openjdk-amd64/bin/java to execute josm.
JOSM/1.5 (12545 Debian en) Linux Ubuntu Artful Aardvark (development branch)
josm -HELP (return code: -15)
Using /usr/lib/jvm/java-9-openjdk-amd64/bin/java to execute josm.
Java OpenStreetMap Editor [JOSM/1.5 (12545 Debian en) Linux Ubuntu Artful Aardvark (development branch)]
usage:
java -jar josm.jar <options>...
options:
--help|-h Show this help
--geometry=widthxheight(+|-)x(+|-)y Standard unix geometry argument
[--download=]minlat,minlon,maxlat,maxlon Download the bounding box
[--download=]<URL> Download the location at the URL (with lat=x&lon=y&zoom=z)
[--download=]<filename> Open a file (any file type that can be opened with File/Open)
--downloadgps=minlat,minlon,maxlat,maxlon Download the bounding box as raw GPS
--downloadgps=<URL> Download the location at the URL (with lat=x&lon=y&zoom=z) as raw GPS
--selection=<searchstring> Select with the given search
--[no-]maximize Launch in maximized mode
--reset-preferences Reset the preferences to default
--load-preferences=<url-to-xml> Changes preferences according to the XML file
--set=<key>=<value> Set preference key to value
--language=<language> Set the language
--version Displays the JOSM version and exits
--debug Print debugging messages to console
--skip-plugins Skip loading plugins
--offline=<osm_api|josm_website|all> Disable access to the given resource(s), separated by comma
options provided as Java system properties:
-Djosm.dir.name=JOSM Change the JOSM directory name
-Djosm.pref=/PATH/TO/JOSM/PREF Set the preferences directory
Default: /root/.config/JOSM
-Djosm.userdata=/PATH/TO/JOSM/USERDATA Set the user data directory
Default: /root/.local/share/JOSM
-Djosm.cache=/PATH/TO/JOSM/CACHE Set the cache directory
Default: /root/.cache/JOSM
-Djosm.home=/PATH/TO/JOSM/HOMEDIR Set the preferences+data+cache directory (cache directory will be josm.home/cache)
-Djosm.home has lower precedence, i.e. the specific setting overrides the general one
note: For some tasks, JOSM needs a lot of memory. It can be necessary to add the following
Java option to specify the maximum size of allocated memory in megabytes:
-Xmx...m
examples:
java -jar josm.jar track1.gpx track2.gpx london.osm
java -jar josm.jar https://www.openstreetmap.org/#map=13/43.20000928332714/11.099981433345711
java -jar josm.jar london.osm --selection=http://www.ostertag.name/osm/OSM_errors_node-duplicate.xml
java -jar josm.jar 43.2,11.1,43.4,11.4
java -Djosm.pref=$XDG_CONFIG_HOME -Djosm.userdata=$XDG_DATA_HOME -Djosm.cache=$XDG_CACHE_HOME -jar josm.jar
java -Djosm.dir.name=josm_dev -jar josm.jar
java -Djosm.home=/home/user/.josm_dev -jar josm.jar
java -Xmx1024m -jar josm.jar
Parameters --download, --downloadgps, and --selection are processed in this order.
Make sure you load some data if you use --selection.