Author: Bob Jacobsen
Keywords: JMRI technical code road map

# JMRI: Java Version-Specific Features

This page contains information about the compatibility and features of various Java versions. We use this information to decide on our road map for future JMRI versions. (For pre-Java-1.8 content, see the historical page.)

Note: The Java community has moved from a "few big Java releases, years apart" development cycle to a cycle with a new release every six months, and a long-term support (LTS) release every three years. (For background, see here, here, here). For more information on this, see also this Java Magazine article from November 2018 .

## Capabilities

This section lists new Java capabilities, and which Java version they first appeared in. The "JDK" column shows the first Java Development Kit that could compile the feature; the "JRE" column lists the first runtime environment that could run the feature, including the needed JVM and library support.

Feature | JDK | JRE
--- | --- | ---
HiDPI graphics support for Windows and Linux users. Probably "just works" with JRE update, unless something in JMRI breaks on Java 9 on Windows (Currently support using very large fonts as a workaround, but it quickly breaks as text overlaps widget boundaries) | 8 | 9
Multi-version JARs can help with migration from then on, see discussion | 9 | 9
The Deprecated annotation can take "since" and "forRemoval" specifications, which simplifies our API migration management a lot. | 9 | 8
Java Platform Module System | 9 | 9
UTF-8 Properties files (simplifies I18N) | 9 | 9
JLink - improve packaging, faster startup | 9 | 9
Immutable Lists, Sets and Maps: More useful than it maybe sounds, because it can help keep the separate parts (i.e. better and worse code) of JMRI independent. | 9 | 9
var syntax - improves readability of code, use of generics | 10 11 | 10
Even better support for immutable collections | 10 | 10
Improvements in Optional: or(), ifPresentOrElse() | 9 | 9
More improvements in Optional: orElseThrow() | 10 | 10
Completion of Optional class: isEmpty() | 11 | 11
Incompatible change in the MacOS X (macOS) App menu About, Preferences, and (critically) Quit handling on that platform | > 9 | > 9
Applescript support on MacOS X (macOS) removed from the JVM (Note that Java 7 and 8 included Applescript support but disabled it unless an additional JAR file enabling it was added by the user). | > 9 | > 9
Improved String whitespace support | 11 | 11
JMRI uses several com.sun classes that will, at some point, no longer be accessible. This was originally scheduled as part of JPMS for 1.9, but was later removed. At some point, we will need to migrate away from these before using a more advanced JRE or JDK. | > 11 | > 11
The Z Garbage Collector may provide better performance because of reduced garbage collection pauses. | 11 | 11
The Shenandoah garbage collector might be another source of better performance. | 12 | 12
A standard installation of GraalVM is available that can run parts of Python 3.7. Although this is "far from complete", no other project appears to be emerging to include Python 3 support in i.e. Jython. Having this available can let JMRI start a gentler migration. | 11 | 11
The Nashorn interpreter will be removed in Java 15. Some adaptation will be needed to have a JavaScript interpreter, perhaps GraalVM or Rhino. | 15 | 15

(* indicates that a compatibility library is used in the early version)

## JRE availability

This section lists the most recent Java Runtime version recommended by Oracle for various operating system versions. Please note that not all users of that operating system will have updated to this Java version; many will be using an older one.

JMRI development requires Java 8u101 or later through January 2022. 8u101 contains a certificate change that's needed to link to some remote Javadocs. After that, Java 11 will be required.

Oracle's page on Java 1.7 requirements says "Note: As of April 8, 2014 Microsoft stopped supporting Windows XP and therefore it is no longer a supported platform." Google finds numerous pages that show how to install Java 1.7 on XP or XP SP2. Although the corresponding Java 8 page makes no mention of XP, it seems reasonable to assume the same applies. JMRI's Windows installation page keeps updated information on this. Several JMRI users have reported that Java 1.8_151 is the last one that can be cleanly installed and run on XP. See the Java download archive page for links to that.

Java plans for end of life of various versions:

- Java 8 will keep receiving free updates through March 2022 for personal use. Note that Oracle is no longer actively maintaining Java 8.
- Java 11, made available in September 2018, will be a "Long Term Support" (LTS) release. That means five years of support, through September 2023.
- Java 9, 10, and 12 through 16 will not be LTS releases, and support will end shortly after the following release comes out.
- Java 17 is the current LTS release, made available in September of 2021. It is also expected to get five years of support, through September 2026.

For more information, see the Java pages for:

- Java 8 (March 2014)
- Java 9 (Sept 2017) see also the OpenJDK page
- Java 10 (March 2018)
- Java 11 LTS (Sept 2018)
- Java 12 (March 2019)
- Java 13 (Sept 2019)
- Java 14 (March 2020)
- Java 15 (Sept 2020)
- Java 16 (March 2021)
- Java 17 (Sept 2021)

Model railroaders may not care if they're using a Java version that's supported. Some of them don't connect their layout computers to the internet; some have single-purpose machines that, if messed up, they'll just reload. But other JMRI users have multi-purpose machines whose security matters; essentially all of the JMRI developers are in this situation. At least some of the developers use dual-purpose machines that are required to meet various security and update standards. For those, Java 8 has increasing become a liability.

Java 11 JDK from Oracle only runs on 64-bit Windows versions (no 32-bit). AdoptOpenJDK continues to make 32 and 64-bit JREs and JDKs available. Light red indicates unable to run Java 8 or later; darker red means able to run Java 8, but not Java 11.

OS and platform | Last JRE
--- | ---
Linux | (depends, but generally 11+)
Linux Fedora 33 | 11
Linux Fedora 32 | 8
Linux Centos 7 | 11+
Win 11 (64-bit) | 11+
Win 8 (32-bit) | 8
Win 7 (32-bit) | 8
Win Server 2008 (32-bit) | 8
Win Web Server 2008 (32-bit) | 1.6
Win 2000 (32-bit) | 1.6
Win Server 2003 (32-bit) | 1.6
Win 8 (64-bit) | 11+
Win Server 2012 (64-bit) | 11+
Win Server 2012 R2 (64-bit) | 11+
Win 7 (64-bit) | 11+
Win Server 2008 R2 (64-bit) | 10
Win Server 2008 (64-bit) | 1.7
Win Web Server 2008 R2 (64-bit) | 1.6
Win Vista (64-bit) | 11+
Windows Vista (32-bit) | 8 Unofficial Support
Win 2003 (64-bit) | 1.6
Windows XP | 8 Unofficial Support
Windows 98 (2nd Ed) | 1.5-11
Windows 98 | 1.4.2_14
Windows 95 | 1.3.1_20
Mac OS X 10.10 and later | 11+
Mac OS X 10.8.3 Mountain Lion | 8
Mac OS X 10.7.3 | 1.7
Mac OS X 10.5.8 | 1.6 (Apple JVM)
Mac OS X 10.5.7 and earlier on Intel | 1.5 (Apple JVM)
Mac OS X 10.3 and later on PowerPC | 1.5 (Apple JVM)
MacOS "Classic" | 1.1.8
OS/2 | 1.3

See the Java.com download page for all Operating Systems and
information on Java versions and hardware requirements.

## System Requirements

The following combination of JMRI - Java - Platform/OS versions was based on Oracle and OS developers sources. It's translated to the OS install instructions (follow hyperlink in OS headers):

JMRI | Java | OS X | Windows | Oracle Linux (RHEL) | Ubuntu | Raspbian
--- | --- | --- | --- | --- | --- | ---
5.* | 11 | 10.10 | Windows Vista or later 64 bit only | 5.5 | 12.04 | 14.04LTS
4.* | 1.8 | 10.8.3 Mountain Lion | Win7 SP1/8/10, Vista SP2, (XP) | 5.5 | 12.04 | 14.04LTS
3.10.1 | 1.7 | 10.7.3 Lion | Win7 SP1/8/10, Vista SP2, (XP) | 5.5 | 12.04 | 12.04
3.10.1 | 1.6 | 10.6 Snow Leopard (JVM6) | Win2003, Win2000 (x86) | 5.5 | 10.4 | N/A
2.14.1 | 1.5 | 10.5.7 Leopard (JVM5) | Vista SP1, Win2000 SP3, Win8.x (x64) |  | 9.04 | N/A
2.8 | 1.5 | 10.4 Tiger | Win98 (2nd Ed), XP, ME |  |  | N/A
2.2 | 1.5 | 10.3 Panther | Win98, ME | N/A | N/A | N/A
| 1.3.1 | 10.3 Panther | Win95, Win98 | N/A | N/A | N/A
1.6 | 1.1.8 | MacOS9.1 (MRJ) | Win95, Win98 | N/A | N/A | N/A