Changes between Version 40 and Version 41 of Help/CommandLineOptions


Ignore:
Timestamp:
2021-01-18T00:57:21+01:00 (5 years ago)
Author:
Hb---
Comment:

Other options restored

Legend:

Unmodified
Added
Removed
Modified
  • Help/CommandLineOptions

    v40 v41  
    11[[TranslatedPages]]
    2 [[PageOutline]]
     2[[PageOutline(2)]]
    33
    44= Command Line Options =
     
    77 * 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''.
    9  * Only involved in Web Start are the [#run-options Run-options⤓].
    10  * Some [#Otheroptions Other options⤓] for diagnostics and launchers.
     9 * Involved in Web Start and diagnosis are the [#run-options Run-options⤓].
     10 * Some [#Otheroptions Other options⤓] for helper programs.
    1111
    1212{{{
     
    1616
    1717# Launch a Web Start
    18 javaws [run-options] -J[Java option] josm.jnlp
     18javaws [Run-options] -J[Java option] josm.jnlp
    1919}}}
    2020
    2121The [wikitr:/Help/Action/ShowStatusReport Status Report] lists the given Program arguments and Java options in its second section.
    2222Some [#Examples examples⤓] for both of them are shown below.
    23 As usual in all four types the arguments are separated by space from each other.
    24 
    25 == JOSM program arguments ==#Programarguments
     23As usual the arguments are separated by space from each other.
     24
     25== Program arguments for JOSM ==#Programarguments
    2626
    2727The first argument can be a **command** for JOSM to make it work autonomous.
    28 If JOSM can't recognize the first argument as command, then `runjosm` is assumed as default.
     28The commands are `render`, `project` or `runjosm` as default.
    2929
    3030The remaining arguments are **options** for JOSM. 
    3131They can be URLs, filenames, coordinates, simple options and option=value pairs.
    32 The complete list of commands and options is shown below:
     32
     33The options for runjosm are listed in the following.
     34At the bottom are the options for the commands  [#Programargumentsrendering render⤓] and [#Programargumentsproject project⤓].
    3335
    3436{{{
     
    8486
    8587{{{
    86 java options:
    87   -Djosm.dir.name=JOSM                      Change the JOSM directory name
    88   -Djosm.pref=/PATH/TO/JOSM/PREF            Set the preferences directory
    89                                             Default: C:\Users\name\AppData\Roaming\JOSM
    90   -Djosm.userdata=/PATH/TO/JOSM/USERDATA    Set the user data directory
    91                                             Default: /home/name/.local/share/JOSM
    92   -Djosm.cache=/PATH/TO/JOSM/CACHE          Set the cache directory
    93                                             Default: <...>
    94   -Djosm.home=/PATH/TO/JOSM/HOMEDIR         Set the common directory for preferences,
    95                                             user data and ./cache/. Lower precedence.
    96                                             Will get overridden from specific setting.
    97   -Xmx...m                                  Set maximum Java heap size in megabytes.
    98                                             May avoid Out-of-Memory errors.
     88Java system properties options:
     89      -Djosm.dir.name=JOSM                      Change the JOSM directory name
     90      -Djosm.pref=/PATH/TO/JOSM/PREF            Set the preferences directory
     91                                                Default: C:\Users\name\AppData\Roaming\JOSM
     92      -Djosm.userdata=/PATH/TO/JOSM/USERDATA    Set the user data directory
     93                                                Default: /home/name/.local/share/JOSM
     94      -Djosm.cache=/PATH/TO/JOSM/CACHE          Set the cache directory
     95                                                Default: <...>
     96      -Djosm.home=/PATH/TO/JOSM/HOMEDIR         Set the common directory for preferences,
     97                                                user data and ./cache/. Lower precedence.
     98                                                Will get overridden from specific setting.
     99      -Xmx...m                                  Set maximum Java heap size in megabytes.
     100                                                May avoid Out-of-Memory errors.
    99101}}}
    100102
     
    106108For UTF-8 on Windows, invoke `chcp 65001` in the Windows terminal window before launching JOSM using `java -Dfile.encoding=UTF-8 -jar josm-tested.jar`
    107109
    108 [=#Examples **Examples**]
     110[=#Examples **Examples for JOSM runjosm options and Java options**]
    109111{{{
    110112#!sh
     
    130132
    131133
    132 == Java Web Start Run-options ==#run-options
    133 The run-options are used by the `javaws` command. They control the Web Start mechanism and can encapsulate Java options.
    134 {{{
     134== Run-options for Java Web Start ==#run-options
     135The run-options are read by the `javaws` command. They control the Web Start mechanism, can encapsulate Java options and can diagnose Java.
     136{{{
     137#!sh
     138# Control
    135139  -offline                  Allows to Web Start JOSM without internet access
     140
     141# Encapsulate
    136142  -J<java option>           Supplies the <java option> to the JVM
    137143  -J-Xmx1024m               Here: Set maximum Java heap size to 1024 megabyte
    138 }}}
    139 
    140 The `-J` run-option takes its part behind the J letter and supplies that as Java option.
    141 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.
    142 
    143 The `javaws` command has some control options on all systems.
    144 On [wikitr:/Download#Mswindowswrapper MS Windows] only the Launcher `josm.exe` aka [http://launch4j.sourceforge.net/docs.html#Runtime_options  Launch4j] may give some debug info (needs 64-bit Java on 64-bit Windows). 
    145 {{{
    146 #!sh
    147 # Control options:
     144
     145# Diagnosis
    148146javaws -viewer            Shows the Cache Viewer in the Java Control Panel
    149147# Allows to opens the Java Control Panel from the command line.
     
    153151# by the 'Settings' button in the 'General' tab of the Java Control Panel.
    154152# javaws -Xclearcache on OpenJDK
    155 
    156 
    157 # On MS Windows:
     153}}}
     154
     155The `-J` run-option takes its part behind the J letter and supplies that as Java option.
     156The [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.
     157
     158The `javaws` command has some control options on all systems.
     159
     160The `-clearcache` option and clearing the cache via the Java Control Panel will both delete JNLP based icons from the Desktop. The JOSM icon will be gone if it was placed as result of a click in a web browser on a jnlp-file.
     161
     162== Other options ==#Otheroptions
     163
     164The 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. 
     165{{{
     166#!sh
    158167josm.exe --j4l-debug      Tries to write a launch4j.log to current directory
    159168josm.exe --j4l-dont-wait  Ends the wrapper after invoking JOSM.
    160169}}}
    161 The `-clearcache` option and clearing the cache via the Java Control Panel will both delete JNLP based icons from the Desktop. The JOSM icon will be gone if it was placed as result of a click in a web browser on a jnlp-file.
    162 
    163 == JOSM rendering command line interface ==
     170
     171== Command line for Render and Project ==
     172
     173=== JOSM rendering Programm arguments ===#Programargumentsrendering
    164174
    165175{{{
     
    213223}}}
    214224
    215 == JOSM projection command line interface ==
     225=== JOSM projection Programm arguments ===#Programargumentsprojection
    216226
    217227{{{
     
    246256}}}
    247257
     258On this page 'josm.jar' is short for one of the releases josm-tested.jar or josm-latest.jar.
     259
    248260== See also ==
    249261* [wikitr:/Download#Troubleshooting Troubleshooting Java]