Changes between Version 32 and Version 33 of Help/CommandLineOptions


Ignore:
Timestamp:
2019-02-21T11:39:58+01:00 (7 years ago)
Author:
Hb---
Comment:

wikitr

Legend:

Unmodified
Added
Removed
Modified
  • Help/CommandLineOptions

    v32 v33  
    11[[TranslatedPages]]
    22= Command Line Options =
    3 {{{#!comment
    4 No table of content. Instead the first paragraph introduces into the problem and offers internal links to the headings.
    5 }}}
    6 Three groups of command line options affect JOSM.
    7 The [#Programarguments Program arguments⤓] directly controls the program.
    8 The [#Javaoptions Java options⤓] affect the Java environment.
    9 Because Program arguments can be encapsulated by Java options the [#Examples examples⤓] are joint for both of them.
    10 Only involved in Web Start are the [#run-options run-options⤓].
    11 The last section deals with [#Otheroptions other options⤓] used in the Help.
    123
     4Four types of command line options affect JOSM:
     5 * The [#Programarguments Program arguments⤓] directly control JOSM. They are called ''args'' by Oracle.
     6 * The [#Javaoptions Java options⤓] affect its environment (JVM) and are sometimes named ''VM arguments''.
     7 * Only involved in Web Start are the [#run-options rRun-options⤓].
     8 * Some [#Otheroptions Other options⤓] for diagnostics and launchers.
    139
    1410{{{
     
    2117}}}
    2218
     19The [wikitr:/Help/Action/ShowStatusReport Status Report] lists the given Program arguments and Java options in its second section.
     20Some [#Examples examples⤓] for both of them are shown below.
     21As usual in all four types the arguments are separated by space from each other.
    2322
    24 === Program arguments ===#Programarguments
     23== Program arguments ==#Programarguments
    2524
    26 Also called ''Post jar arguments'' here or ''args'' by Java publishers.
     25The first argument can be a **command** for JOSM to make it work autonomous.
     26If JOSM can't recognize the first argument as command, then `runjosm` is assumed as default.
    2727
    28 The first argument is seen as ''command'' by JOSM. The possible commands are `runjosm` for normal launch (default), `render` for generating an image file and `project` converting coordinates. If JOSM can't recognize a command the default is assumed.
    29 
    30 The following arguments are ''options'' for JOSM. They are separated by spaces. They can be URLs, filenames, coordinates, simple options and option=argument pairs. The complete list of commands and options is shown below:
     28The remaining arguments are **options** for JOSM. 
     29They can be URLs, filenames, coordinates, simple options and option=value pairs.
     30The complete list of commands and options is shown below:
    3131
    3232{{{
     
    5858  --language=<language>                     Set the language
    5959  --version                                 Displays the JOSM version and exits
    60   --debug                                   Print debugging messages to console
     60  --debug     or   --trace                  Print debugging messages to console
    6161  --skip-plugins                            Skip loading plugins
    6262  --offline=[osm_api,][josm_website,][all]  Disable access to the listed resources
     
    6666The arguments `--download`, `--downloadgps` and `--selection` are processed in this order.
    6767The value `<url-to-xml>` can point to a local file with `file:relative/path/name.xml`.
    68 More verbose than --debug is the `--trace` option.
    6968The items in the `--offline` value are separated by comma.
    7069
    7170
    72 === Java options ===#Javaoptions
     71== Java options ==#Javaoptions
    7372
    74 The Java options are also ''JOSM JVM options'' called here or ''VM arguments'' in the [wiki:/Help/Action/ShowStatusReport Status Report]. In that report you can see the invoked Program Arguments and below the VM arguments. They control the Java virtual machine [https://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html (JVM)] and can set [https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html properties] inside it. JOSM reads some of them, for example `josm.home` and `user.language`.
     73They control the Java virtual machine [https://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html (JVM)] and can set [https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html properties] inside it. JOSM reads some of them, for example `josm.home` and `user.language`.
    7574{{{
    7675java options:
     
    8988}}}
    9089
    91 The `-Xmx...m` option may be useful when [wiki:/Download#Outofmemory Out of Memory] errors arise.
     90The `-Xmx...m` option may be useful when [wikitr:/Download#Outofmemory Out of Memory] errors arise.
    9291If you set a common directory with `Djosm.home` then JOSM will create the subdirectories ./autosave, ./cache and ./validator.
    9392If a value has spaces, then enclose it in quotation marks like `"josm dev"`.
     
    9594Which [https://msdn.microsoft.com/de-de/library/windows/desktop/dd317756%28v=vs.85%29.aspx code page] is used shows `chcp⏎` in the terminal.
    9695
    97 === Examples ===#Examples
    98 Examples for the Program arguments and Java options in action:
     96[=#Examples **Examples**]
    9997{{{
    10098#!sh
     
    115113  java -Xmx1024m -Duser.language=fr -jar josm.jar
    116114#
    117 # Do not get disturbed by phoning home and log debugging info
    118 java -verbose -jar josm-latest.jar --set=message.notifier.enabled=false --debug >WhatsUp.txt
     115# Log debug info and do not get disturbed by JOSM phoning home
     116  java -verbose -jar josm-latest.jar --set=message.notifier.enabled=false --debug >WhatsUp.txt
    119117}}}
    120118
    121119
    122 === run-options ===#run-options
    123 The run-options follow the `javaws` command. They control the Web Start mechanism and the environment for the JVM.
     120== Run-options ==#run-options
     121The run-options are used by the `javaws` command. They control the Web Start mechanism and can encapsulate Java options.
    124122{{{
    125123  -offline                  Allows to Web Start JOSM without internet access
     
    129127
    130128The `-J` run-option takes its part behind the J letter and supplies that as Java option.
    131 The [wiki:/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.
     129The [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.
    132130
    133 === Other options ===#Otheroptions
    134 The `javaws` command on all systems and the Launcher `josm.exe` aka [http://launch4j.sourceforge.net/docs.html#Runtime_options  Launch4j] on MS Windows have some diagnostic options.
     131== Other options ==#Otheroptions
     132The `javaws` command has some control options on all systems.
     133On [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). 
    135134{{{
    136135#!sh
     136# Control options:
    137137javaws -viewer            Shows the Cache Viewer in the Java Control Panel
    138138# Allows to opens the Java Control Panel from the command line.
     
    143143# javaws -Xclearcache on OpenJDK
    144144
     145
     146# On MS Windows:
    145147josm.exe --j4l-debug      Tries to write a launch4j.log to current directory
    146148josm.exe --j4l-dont-wait  Ends the wrapper after invoking JOSM.
    147 
    148149}}}
    149150The `-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.