Changes between Version 43 and Version 47 of Help/CommandLineOptions


Ignore:
Timestamp:
(multiple changes)
Author:
(multiple changes)
Comment:
(multiple changes)

Legend:

Unmodified
Added
Removed
Modified
  • Help/CommandLineOptions

    v43 v47  
    55
    66Four types of command line options affect JOSM:
    7  * The [#Programarguments Program arguments⤓] directly control JOSM. They are called ''args'' by Java. 
     7 * The [#Programarguments Program arguments⤓] directly control JOSM. They are called ''args'' by Java.
    88 * The [#Javaoptions Java options⤓] affect its environment (JVM) and are sometimes named ''VM arguments''.
    99 * The [#run-options Run-options⤓] are involved in WebStart. Some are for diagnosis and import.
     
    1919}}}
    2020
    21 The [wikitr:/Help/Action/ShowStatusReport Status Report] from the Help menu lists the given Program arguments and Java options. 
     21The [wikitr:/Help/Action/ShowStatusReport Status Report] from the Help menu lists the given Program arguments and Java options.
    2222Some [#Examples examples⤓] for both of them are shown below.
    2323
     
    2929== Program arguments for JOSM ==#Programarguments
    3030
    31 The first argument can be a **command** for JOSM to make it work autonomous. 
     31The first argument can be a **command** for JOSM to make it work autonomous.
    3232The commands are `render`, `project` or `runjosm` as default.
    3333
    34 The remaining arguments are **options** for JOSM. 
    35 They can be URLs, filenames, coordinates, simple options and option=value pairs. 
    36 
    37 The options for runjosm are listed in the following. 
    38 At the bottom are the options for the commands  [#Programargumentsrendering render⤓] and [#Programargumentsproject project⤓].
     34The remaining arguments are **options** for JOSM.
     35They can be URLs, filenames, coordinates, simple options and option=value pairs.
     36
     37The options for runjosm are listed in the following.
     38At the bottom are the options for the commands [#Programargumentsrendering render⤓] and [#Programargumentsproject project⤓].
    3939
    4040{{{
     
    4646        render      render data and save the result to an image file
    4747        project     convert coordinates from one coordinate reference system to another
     48        validate    validate data
    4849
    4950For details on the render and project commands, run them with the --help option.
     
    5455        --geometry=widthxheight(+|-)x(+|-)y       Standard unix geometry argument
    5556        [--download=]minlat,minlon,maxlat,maxlon  Download the bounding box
    56         [--download=]<URL>                        Download the location at the OSM-style URL
    57         [--download=]<filename>                   Open a file (any type suitable for File/Open)
     57        [--download=]<URL>                        Download the location at the URL (with lat=x&lon=y&zoom=z)
     58        [--download=]<filename>                   Open a file (any file type that can be opened with File/Open)
    5859        --downloadgps=minlat,minlon,maxlat,maxlon Download the bounding box as raw GPS
    59         --downloadgps=<URL>                       Download the location at the URL as raw GPS
     60        --downloadgps=<URL>                       Download the location at the URL (with lat=x&lon=y&zoom=z) as raw GPS
    6061        --selection=<searchstring>                Select with the given search
    61         --[no-]maximize                           Launch in maximised mode
     62        --[no-]maximize                           Launch in maximized mode
    6263        --reset-preferences                       Reset the preferences to default
    6364
     
    7071        --version                                 Displays the JOSM version and exits
    7172
    72         --debug                                   Print debug info on Mapview and stdout (console)
     73        --status-report                           Show status report with useful information that can be attached to bugs
     74
     75        --debug                                   Print debugging messages to console
    7376
    7477        --skip-plugins                            Skip loading plugins
     
    7982}}}
    8083
    81 The `--download=` part of the download option is optional. 
     84The `--download=` part of the download option is optional.
    8285The arguments `--download`, `--downloadgps` and `--selection` are processed in this order.
    8386The value `<url-to-xml>` can point to a local file with `file:relative/path/name.xml`.
     
    9194{{{
    9295Java system properties options:
    93       -Djosm.dir.name=JOSM                      Change the JOSM directory name
    94       -Djosm.pref=/PATH/TO/JOSM/PREF            Set the preferences directory
    95                                                 Default (Linux XDG): /home/name/.config/JOSM
    96                                                 Default (Windows): C:\Users\name\AppData\Roaming\JOSM
    97       -Djosm.userdata=/PATH/TO/JOSM/USERDATA    Set the user data directory
    98                                                 Default (Linux XDG): /home/name/.local/share/JOSM
    99                                                 Default (Windows): C:\Users\name\AppData\Roaming\JOSM
    100       -Djosm.cache=/PATH/TO/JOSM/CACHE          Set the cache directory
    101                                                 Default (Linux XDG): /home/name/.cache/JOSM
    102                                                 Default (Windows): C:\Users\name\AppData\Local\JOSM\cache
    103       -Djosm.home=/PATH/TO/JOSM/HOMEDIR         Set the common directory for preferences,
    104                                                 user data and ./cache/. Lower precedence.
    105                                                 Will get overridden from specific setting.
    106       -Xmx...m                                  Set maximum Java heap size in megabytes.
    107                                                 May avoid Out-of-Memory errors.
     96    -Djosm.dir.name=JOSM                      Change the JOSM directory name
     97    -Djosm.pref=/PATH/TO/JOSM/PREF            Set the preferences directory
     98                                              Default (Linux XDG): /home/name/.config/JOSM
     99                                              Default (Windows): C:\Users\name\AppData\Roaming\JOSM
     100    -Djosm.userdata=/PATH/TO/JOSM/USERDATA    Set the user data directory
     101                                              Default (Linux XDG): /home/name/.local/share/JOSM
     102                                              Default (Windows): C:\Users\name\AppData\Roaming\JOSM
     103    -Djosm.cache=/PATH/TO/JOSM/CACHE          Set the cache directory
     104                                              Default (Linux XDG): /home/name/.cache/JOSM
     105                                              Default (Windows): C:\Users\name\AppData\Local\JOSM\cache
     106    -Djosm.home=/PATH/TO/JOSM/HOMEDIR         Set the common directory for preferences,
     107                                              user data and ./cache/. Lower precedence.
     108                                              Will get overridden from specific setting.
     109    -Xmx...m                                  Set maximum Java heap size in megabytes.
     110                                              May avoid Out-of-Memory errors.
    108111}}}
    109112
     
    111114If you set a common directory with `Djosm.home` then JOSM will create the subdirectories ./autosave, ./cache and ./validator.
    112115If a value has spaces, then enclose it in quotation marks like `"josm dev"`.
     116
    113117When the non-ASCII characters in the command prompt are scrambled, use `-Dfile.encoding=Cp850` to receive text from Java in another [https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html code page].
    114118Which [https://msdn.microsoft.com/de-de/library/windows/desktop/dd317756%28v=vs.85%29.aspx code page] is used shows `chcp⏎` in the terminal.
    115119For UTF-8 on Windows, invoke `chcp 65001` in the Windows terminal window before launching JOSM using `java -Dfile.encoding=UTF-8 -jar josm.jar`
     120
     121JOSMs Debian package `josm-latest` uses `-Djosm.dir.name=JOSM-latest` to offer parallel installations in the XDG base directories.
    116122
    117123[=#Examples **Examples for JOSM runjosm options and Java options**]
     
    134140  java -Xmx1024m --set=message.notifier.enabled=false  -jar josm.jar
    135141#
    136 # Start in an English environment and log debug info plus messages from stderr 
     142# Start in an English environment and log debug info plus messages from stderr
    137143  java -Duser.language=en -jar josm.jar --debug 1>logfile.txt 2>&1
    138144}}}
     
    141147== Run-options for Java Web Start ==#run-options
    142148
    143 The run-options are read by the `javaws` command. They control the Web Start mechanism, can encapsulate Java options and can diagnose Java. 
    144 {{{
    145 #!sh
    146 # Control 
     149The run-options are read by the `javaws` command. They control the Web Start mechanism, can encapsulate Java options and can diagnose Java.
     150{{{
     151#!sh
     152# Control
    147153  -offline                  Allows to Web Start JOSM without internet access
    148154
    149155# Encapsulate
    150   -J<java option>           Supplies the <java option> to the JVM 
     156  -J<java option>           Supplies the <java option> to the JVM
    151157  -J-Xmx1024m               Here: Set maximum Java heap size to 1024 megabyte
    152158
    153159# Diagnosis
    154 javaws -viewer            Shows the Cache Viewer in the Java Control Panel 
     160javaws -viewer            Shows the Cache Viewer in the Java Control Panel
    155161# Allows to opens the Java Control Panel from the command line.
    156162
    157163javaws -clearcache        Removes all non-installed applications from the cache
    158 # Equal to 'Delete Files and Applications' from the 'Temporary File Settings' invoked 
     164# Equal to 'Delete Files and Applications' from the 'Temporary File Settings' invoked
    159165# by the 'Settings' button in the 'General' tab of the Java Control Panel.
    160166# javaws -Xclearcache on OpenJDK
    161167}}}
    162168
    163 The `-J` run-option takes its part behind the J letter and supplies that as Java option. 
    164 The [wikitr:/Help/jnlpOptions jnlp-File] used by [https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javaws.html Web Start] offers a second way to [https://docs.oracle.com/javase/8/docs/technotes/guides/javaws/developersguide/syntax.html  set options] for JRE and for the JOSM program directly. 
     169The `-J` run-option takes its part behind the J letter and supplies that as Java option.
     170The [wikitr:/Help/jnlpOptions jnlp-File] used by [https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javaws.html Web Start] offers a second way to [https://docs.oracle.com/javase/8/docs/technotes/guides/javaws/developersguide/syntax.html  set options] for JRE and for the JOSM program directly.
    165171
    166172The `javaws` command has some control options on all systems.
     
    170176== Other options ==#Otheroptions
    171177
    172 The Launcher `josm.exe` aka [http://launch4j.sourceforge.net/docs.html#Runtime_options Launch4j] (only on [wikitr:/Download#Mswindowswrapper MS Windows]) may give some debug info. 
     178The Launcher `josm.exe` aka [http://launch4j.sourceforge.net/docs.html#Runtime_options Launch4j] (only on [wikitr:/Download#Mswindowswrapper MS Windows]) may give some debug info.
    173179{{{
    174180#!sh
     
    179185== Command line for Render and Project ==
    180186
    181 === JOSM rendering Programm arguments ===#Programargumentsrendering
     187=== JOSM rendering Program arguments ===#Programargumentsrendering
    182188
    183189{{{
     
    231237}}}
    232238
    233 === JOSM projection Programm arguments ===#Programargumentsprojection
     239=== JOSM projection Program arguments ===#Programargumentsprojection
    234240
    235241{{{