Install JMRI®
DecoderPro®
A great tool for programming decoders, simplifying the job of configuring DCC decoders from your computer
PanelPro™
Design and Operate control panels that reflect the real-time state of your railroad and let you control it
DispatcherPro™
A system for Dispatching, grouping your Roster and Throttles
OperationsPro™
Build Trains from your Roster and print Train Manifests that detail the work your train crews will perform
SoundPro™
A set of tools for using Audio with JMRI
Cool Uses
People have used JMRI to do some great things for the model railroad community.
Our Gallery page highlights some of these.
Also, there are many apps with JMRI connections.
Supported Hardware
Devices, command stations, networks, and protocols:
JMRI Setup and Installation
JMRI environments...

JMRI Help:

Contents Index
Glossary FAQ

Donate to JMRI.org


Using Java 11 with JMRI

We recommend using Java 11 with current JMRI versions. Starting with JMRI 5.0, the minimum Java version is 11.

JMRI needs a "Java Runtime Environment" (JRE) to run but will work fine with the larger "Java Development Kit" (JDK). A JDK is only needed if you want to work on JMRI development, i.e. make changes and compile them.

Before getting a new version of Java, it is useful to check what version is currently installed on your computer. On Windows, for example, open a "command" window by typing "Command prompt" into the search bar next to the Windows Start icon. Then type:

java -version

IT IS RECOMMENDED THAT YOU REMOVE OLD VERSIONS OF JAVA BEFORE YOU UPGRADE. This avoids a number of reported problems. On Windows, for example, you can:

See the JMRI Setup and Install pages for more information.

Getting Java 11

For Linux distributions

Linux distributions should use the standard package manager. For Debian based distributions such as Ubuntu, Mint, and Raspberry PI OS, the package manager is apt. For Red Hat based distributions such as Fedora and CentOS, the package manager is dnf.

The following steps use the terminal command line. The apt and dnf commands require root authority via sudo.

Check for current Java installs.

java -version

Java was previously installed

openjdk version "1.8.0_362"
OpenJDK Runtime Environment (build 1.8.0_362-8u362-ga-0ubuntu1~22.04-b09)
OpenJDK 64-Bit Server VM (build 25.362-b09, mixed mode)
    

The Java 1.8 version needs to be removed. That process is outside the scope of this document. Search for linux remove java. The steps involved depend on the distribution, the source and the Java version. An alternative is to use the local Java within JMRI approach. See Local Java

Java has not been installed

Debian based:
Command 'java' not found, but can be installed with:
sudo apt install default-jre              # version 2:1.11-72build2, or
sudo apt install openjdk-11-jre-headless  # version 11.0.18+10-0ubuntu1~22.04
sudo apt install openjdk-17-jre-headless  # version 17.0.6+10-0ubuntu1~22.04
sudo apt install openjdk-18-jre-headless  # version 18.0.2+9-2~22.04
sudo apt install openjdk-19-jre-headless  # version 19.0.2+7-0ubuntu3~22.04
sudo apt install openjdk-8-jre-headless   # version 8u362-ga-0ubuntu1~22.04
    
Red Hat based:
bash: java: command not found...
Install package 'java-11-openjdk-headless' to provide command 'java'? [N/y]
    
Reply N, JMRI needs the full Java version.

Install Java 11

sudo apt install openjdk-11-jre Debian based

sudo dnf install java-11-openjdk Red Hat based

Java Installers for Windows, macOS or Linux 32-bit or 64-bit computers

This section describes two sources of Java 11 installers for 32-bit or 64-bit Windows and macOS machines. These are our recommended solutions. These can also be used for Linux if the above package-manager based solutions are not available for some reason.

Additional Source of Installers for 64-bit computers

If for some reason, the installers in the previous section are not suitable, there are several other sources for Java installers for 64-bit Windows, macOS and Linux computers:

Local install option

Since JMRI 4.99.9

Linux and macOS users can also install Java inside JMRI itself, instead of installing it centrally on their computer. This can be useful if you need different Java versions for other programs, or if for some reason you can't do the central Java install or removal.

We recommend installing Java as described on the top half of this page when possible. The local-install described here is only for cases when that can't be done. Note that you'll need to repeat this process every time you update JMRI, as the local Java install will be overwritten during the update process.

macOS

On macOS, the process is:

When you're done, the JMRI folder contents should look like the picture to the right.

You're all set to start JMRI using that local version of Java!

Linux

On Linux, the process is:

You're all set to start JMRI using that local version of Java!