JMRI Code: System Properties

This page lists the system properties that JMRI uses.

Operating System Properties

os.name
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.

user.dir
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!
user.home
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.
purejavacomm.portnamepattern
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:
-J-Dpurejavacomm.portnamepattern=ttyUSB0
Multiple ports can be specified using the pattern:
-J-Ppurejavacomm.portnamepattern=(ttyUSB0|ttyUSB2)

JMRI properties

jmri.log
Name of JMRI's logging control file, typically default.lcf
jmri.log.path
The directory for storing logs. If not specified, logs are stored in the JMRI settings directory.
jmri.prefsdir
By setting this property, you can explicitly set where JMRI looks for it's preference directory.
jmri.inset.height
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 bottom.

-Djmri.inset.height=45

jmri.inset.width
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.
org.jmri.Apps.(key)
org.jmri.Apps.configFilename