User Tools

Site Tools


project:mt:ug:stratupprops

This is an old revision of the document!


Startup Properties

During the startup sequence of MapTool several properties can be defined on different places. This guide tries to make it a little bit more clear, which can be set where and how.

Definitions of Startup Properties

Startup Properties are properties, you can set only during the startup phase of the application. If you change same, you have to restart the application. There are several reasons for this behavior:

  • JVM property: They are for the java virtual machine in where the application is running. Best examples are the memory properties to define the memory usage of the JVM.
  • Only on startup relevant: E.g. which campaign is loaded during startup is only relevant during startup
  • Complicate to change later: E.g. changing the location of files (e.g. MAPTOOL_DATADIR) during a session is complicated and normally not necessary.

Setting Locations

You can set the value of a property on several locations. Since there are no guaranties, that the value of a property is set on only one location or that it has the same value on all locations, there is a clear hierarchy for the priority of a location.

The locations and there priority from high (overwrite) to low (will be overwritten) by higher locations first:

  • MapTool Command Line Option
    • When you start the MapTool application, you can start it with optional parameters
    • With -h you can get a list of the current command line options of MapTool
    • E.g. maptool.exe -D=“data dictionary” to tell MapTool where the data dictionary is (should be)
  • Startup Property File
    • The standard location & name of this file is startup.properties in the configure subdirectory of the data dictionary of MapTool. E.g. {user.home}/.maptool/config/startup.properties
    • There is an startupExample.properties file with instructions and a list of the currently supported properties at the default location
    • A property is a key value text pair with a '=' or ':' between them
    • E.g. MAPTOOL_DATADIR=“data dictionary”
  • JVM Command Line Parameters (-D, -X, …)
    • Correct usage (prefix) unknown
    • Normally you can set the properties from the configuration file (MapTool.cfg) also during the call of the JVM
    • You can see the normal, not usable prefix in the MapTool.cfg file, e.g. -DMAPTOOL_DATADIR=“data directory”
    • MapTool use a launcher to start the JVM so there should be a prefix you have to set before the JVM option
    • This location should only be used if the application has problems to experiment with different setups.
    • Note: with -D parameters you can declare and set system properties
  • MapTool.cfg (-D, -X, …)
    • The configuration file of MapTool is in the app subdirectory of the application home directory, e.g. {application home]/app/MapTool.cfg
    • This file is overwritten during an update and holds user specific parameters and inherent application specific parameters together
    • Use the startup property file for user specific parameters
    • This location should only be used if the application has problems to change general setups of the application.
    • Note: with -D parameters you can declare and set system properties
  • Default System Properties
    • Most default system properties are dependent values from the operating system (OS) and are set by the JVM
    • e.g. user.home get at the value the path&name of the OS specific home directory of the current user in the OS who starts the application
    • The non standrd system properties will get there default value from the application
  • Default Values
    • This values are defined inside the MapTool application to define a fallback value, if needed.

Overview

This table should give you an overview about all properties during the startup process.

KEY Default Value System Startup Command Line Description
short long
os.nameos dependent Name of the operating system
user.homeos dependent Home directory of the os user
MAPTOOL_DATADIR.maptool+(+)DdatadirMain directory for runtime data (under user home)
Will be ignored in Startup, if STARTUP_PROPS_FILE_NAME is relative to the data directory.
MAPTOOL_LOGDIRlogs++ Directory for logging data (under datadir)
CONFIG_SUBDIR_NAMEconfig Subdirectory under datadir for configuration data
TEMP_SUBDIR_NAMEtmp Subdirectory under datadir for temporary data
CMD_OPTIONS_HELP hhelpCommand options incl. description to log and information frame
DEBUG_FLAGfalse (not set) ddebugSet log level to debug and turn on system.out enhanced debug output
VERSION_OVERWRITEcurrent version vversionOverwrites the MapTool version. ONLY FOR DEVELOPMENT.
Some MapTool functions will break if the version is not set correct! This can corrupt your data!
FULLSCREEN_FLAGfalse (not set) +ffullscreenMaximize the MapTool window on startup
MONITOR_TO USE-1 (not overwrite) gmonitorSets which monitor (graphical device) to use.
WINDOW_WIDTH-1 (not overwrite) wwidthOverride MapTool window width. Only usable together with monitor and height
WINDOW_HEIGHT-1 (not overwrite) hheightOverride MapTool window height. Only usable together with monitor and width
WINDOW_XPOS-1 (not overwrite) xxposOverride MapTool window starting x coordinate. Only usable together with monitor and ypos
WINDOW_YPOS-1 (not overwrite) yyposOverride MapTool window starting y coordinate. Only usable together with monitor and xpos
LIST_MACRO_FLAGfalse (not set) mmacrosWrites a list of the defined macro functions into the log
RESET_FLAGfalse (not set) rresetReset startup options to defaults
DEPRECATED_LOAD_CAMPAIGN_NAME FfileLoad campaign from file on startup. Deprecated: Please use C or campaign
LOAD_CAMPAIGN_NAME +CcampaignLoad campaign on startup. Arg.: Full file path and name of the campaign
STARTUP_PROPS_FILE_NAMEstartup.properties
under config dir.
P Override name (& path) of the startup properties file
SKIP_AUTO_UPDATE_FLAGfalse (not set) + Skips the auto update process. There is also a user preference to do this.
LOCALE_LANGUAGEdefault from os++ Sets the (default) language for the MapTool UI. Fallback will be en (English).
LOCALE_COUNTRYdefault from os++ Sets the (default) country for the MapTool UI.
MAX_MEM +
MIN_MEM +
STACK_SIZE +
ASSERTION +
JAVA2D_D3D +
JAVA2D_OPENGL_OPTION +
MACOSX_EMBEDDED_OPTION +

Recommendation

First try to change the values over the startup tab on the option window. On some OS the MapTool.cfg file is not writeable, so you can not change everything what you can see.
Specially the command line options have to be set directly by yourself.

If you need your own dictionary location(s), best practice would be to set the -P command line option to tell MapTool, what the path & name of the startup property file is and define anything else in that file.
(The data dictonary directory can only be set in the startup properties file, if the startup properties file will be located undependen from the data dictonary!)

If your MapTool application seems to be instable and your OS does not allow the setting of new values over the startup tab on the option window, then go and try to manipulate the MapTool.cfg file.

Try to avoid changes in the MapTool.cfg file, because the file will be overwriten by the next update.

State

Under Construction

For MapTool Version 1.12.x (under development)

project/mt/ug/stratupprops.1680780326.txt.gz · Last modified: 2023/04/06 13:25 by publisher