JMRI Code: System Properties
Operating System Properties
Most of JMRI is system-independent, but in a couple
places we provide system-specific code to customize the
user experience. This is the property we use to tell what
type of computer operating system is in use.
For example, we locate the default preferences directory in different places depending on the system type.
- Java sets this to the directory in which JMRI is running. JMRI uses it to find many of its files; this property should not be changed by the user!
- Java sets this to the "home" directory of the current user. JMRI uses it, on some systems, for locating the default locations for the preferences directory.
- The PureJavaComm communications library uses this to specify
the pattern for serial ports to use. If you have e.g. a USB to serial
adapter which is not showing up in the preferences chooser boxes,
assign its name (not it's path) to this property:
Multiple ports can be specified using the pattern:
- Name of JMRI's logging control file, typically default.lcf
- The directory for storing logs. If not specified, logs are stored in the JMRI settings directory.
- By setting this property, you can explicitly set where JMRI looks for it's preference directory.
If set, provides a minimum inset value for the height of
JMRI windows. The inset is the space allowed for
decorations at the top and bottom of the screen. Set this
to a positive integer N to ensure that JMRI windows open
with at least N pixels available at the top and/or
- If set, provides a minimum inset value for the width of JMRI windows. The inset is the space allowed for decorations around the sides of the screen. Set this to a positive integer N to ensure that JMRI windows open with at least N pixels available on the sides.