Using Java 11 with JMRI
We recommend using Java 11 with current JMRI versions.
JMRI needs a "Java Runtime Environment" (JRE),
but will work fine with the larger "Java Development Kit" (JDK).
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:
- Go to Windows Settings⇒Apps, find Java 8 and click on "Uninstall."
- Alternatively, download the Oracle Java Uninstall tool and follow its instructions
See the JMRI Setup and Install pages for more information.
Getting Java 11
Here are some places you can get Java 11. Click on the links to
go to the download page.
For 32-bit or 64-bit computers:
-
Azul
- Go to the bottom of the page, past the advertising, select
your OS type (Windows, macOS, Linux), then if needed the computer CPU
architecture (we recommend 64-bit if you have a 64-bit computer), then pick the
appropriate download from the page.
Windows users should pick the ".msi" installer, as it properly
sets up various registry values.
macOS users might find the Adoptium installer (next item)
easier to use than the Azul download.
-
Adoptium (Eclipse)
- This website refers to a Java JDK as "Temurin", which is a bit confusing.
Make sure that "Temurin 11" is selected, then press the large "Latest Release" button.
On Windows: when you run the Java installer, be sure to select the "JavaSoft (Oracle) registry keys" option.
On macOS: This will download a .pkg file. Double-click on it to run the installer.
Additionally for 64-bit computers:
-
OpenLogic
-
Select your OS type (Windows, macOS, Linux). OpenLogic only has a 64-bit version so make sure
you have a 64-bit computer. Pick a download from the page.
On Windows: when you run the Java installer, be sure to select the "JavaSoft (Oracle) registry keys" option.
-
Oracle
-
The original JDK source, but this page requires you to set up a (free) Oracle account. No JREs available.
We recommend that Windows users pick the "Windows x64 Installer", as it properly sets up various registry values.
-
IBM
- They provide JDKs under the "Semeru" name.
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:
- Install JMRI into the Applications folder in the usual way.
- Download this Java install file.
- If this created a zulu11.56.19-ca-jre11.0.15-macosx_x64 folder in your Downloads folder, proceed to the next step.
If this created a zulu11.56.19-ca-jre11.0.15-macosx_x64.zip file in your Downloads folder, double click on it to expand it to a folder.
- Rename the zulu11.56.19-ca-jre11.0.15-macosx_x64 folder to just "jre".
Open the JMRI folder in the Applications folder (this is where you would normally launch JMRI)
- Drag the jre folder from the Downloads folder to the JMRI folder.
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:
- Download and place JMRI in the usual way.
Go to the Azul downloads page
and scroll down to the selection box (see to the right).
- Select your Linux type (RHEL, CentOS, Ubuntu, etc) and architecture (x86-64 bit, etc). Leave Java 11 and JRE selected.
- Click on the .zip button (not any of the other ones!) to download onto your computer.
- If this created a directory, proceed to the next step. If it downloaded a .zip file,
expand it into a directory before proceeding to the next step.
- Rename the resulting directory to just "jre".
- Open the JMRI folder you created in the first step (this is where you would normally launch JMRI)
- Move the new jre directory into the JMRI folder.
You're all set to start JMRI using that local version of Java!