Download and install JMRI®
JMRI Setup and Installation
JMRI environments...
Supported Hardware
Devices, command stations, networks, and protocols:
Release Notes
Source Code
Issues

JMRI Help:

Contents Index
Glossary FAQ

Donate to JMRI.org

JMRI: Linux FAQ

Has anybody described making all this work?
The main JMRI Linux page has a general list of things you have to do.

Jon Miner's website provides a nice summary of installing on Fedora.

Robert Plevier has provided a note on his experiences with OpenSUSE.

The "java" command doesn't work. Now what?

Make sure the java bin directory is on the path. For example, the default location for the "SDK" 1.4.2_05 version of java is /usr/java/j2sdk1.4.2_05/bin .

What's the difference between the "SDK" and "JRE" java versions?
"SDK" means Software Development Kit. It's larger, because it contains the compiler and various development tools. It also contains everything you need to run Java programs like JMRI.

"JRE" means Java Runtime Environment. It's just the things you need to run Java programs, not develop them, so it's smaller.

Do I need to install the Java comm libraries?
If you want to use JMRI 2.10 or later, you don't need to install the Java comm libraries. With that version, JMRI changed to use the RXTX library instead, and JMRI carries the needed files with it. If you have the Java comm libraries installed, you will need to remove them.

If you want to use JMRI 2.9.1 or earlier, including JMRI 2.8, you do need to install the Java comm libraries.

Where do I install the Java comm libraries?
This answer is still correct, but no longer needed for JMRI 2.10 or later.

Those libraries need to be installed where they will be found at the java startup. That means they need to be in the directory associated with the "java" command you'll be running.

To find the right version: java -version

Then locate the directories associated with that version. If you have both the "SDK" and "JRE" forms of java installed, it will usually use the SDK directories, but you might want to install to both.

What do I do if my (USB) serial port isn't listed in the Preferences?

There are several options for solving this problem depending on your JMRI version:

  1. For JMRI 4.7.4 and newer: You can identify your desired device's name in the purejavacomm.portnamepattern system property as a parameter to a JMRI launcher script:

    -J-Dpurejavacomm.portnamepattern=ttyUSB0
    

    This can be set in an environment variable JMRI_OPTIONS which can be set in your .bashrc file:

    export JMRI_OPTIONS="${JMRI_OPTIONS} -Dpurejavacomm.portnamepattern=ttyUSB0"
    

    You can also put this into /etc/profile.d/jmri.sh if you don't want to change your personal .bashrc file.

    Note that the "/dev/" prefix is not included in the specification.

    Multiple ports can be specified using a regular expression. The simplest regular expression for this is (ttyUSB0|ttyUSB1) (an or pattern).

  2. For JMRI 2.10 through 4.7.3 only: You can set the environment variable JMRI_SERIAL_PORTS to a colon-separated list of the additional serial port devices you have available. You can set this in your .bashrc file (or equivalent for whatever shell you use):

    export JMRI_SERIAL_PORTS=/dev/nce:/dev/locobuffer

    You can also put this into /etc/profile.d/jmri.sh if you don't want to change your personal .bashrc file.

    Finally, if you want RxTx to scan the available ports for you, you can modify the source code to do this. The instructions for doing this are included in the INSTALLATION file contained within the RxTx package or at the RXTX home site.

  3. For JMRI 2.8 and earlier only: If the RxTx and Java Communications Libraries are installed correctly, and the serial port to which your device is attached isn't listed, you can force RxTx to recognize a specific serial port.

    If you want to force the use of "/dev/ttyUSB0", you can do this by adding the following to the "javax.comm.properties": javax.comm.rxtx.SerialPorts=/dev/ttyUSB0

    Multiple ports can be added to the list by using a colon separated list.

Can JMRI run on a Raspberry Pi?

Certainly, check out the JMRI Install Help on Raspberry Pi.