Java 8 has been published in 2014 and is approaching its end of life. Fortunately, with Java 11, a new long-term support (LTS) release of Java is available. Therefore, starting with LTEX 8.0.0, LTEX requires Java 11 or newer (in the following: “Java 11+”).

What Do I Have to Do?

Due to LTEX’s feature of automatically downloading Java 11 (via AdoptOpenJDK) if necessary, the impact on most users is minimal. The necessary actions you should perform depend on how you used LTEX with Java in the past (substitute “Java 8” with any other version older than Java 11):

  • Scenario: You already have Java 11+ installed, either system-wide or by using the ltex.java.path setting.

    Necessary actions: Nothing to do, you’re all set!

  • Scenario: You have Java 8 installed system-wide (e.g., Windows installer, Linux package, etc.).

    Necessary actions: You should update your system-wide installation of Java, i.e., remove your old Java installation via the Windows Control Panel or your Linux package manager, and install Java 11+ via Windows installer, Linux package, etc. Otherwise, LTEX continues to work, but it will download Java 11 to the extension folder after every update of LTEX.

  • Scenario: You have Java 8 installed in a custom location, and you use the ltex.java.path setting to point to this location.

    Necessary actions: You should update the Java installation of your custom location. Otherwise, LTEX continues to work, but it will download Java 11 to the extension folder after every update of LTEX. Don’t forget to update ltex.java.path if the name of the directory of your Java installation included the Java version.

  • Scenario: You don’t have Java installed at all.

    Necessary actions: Nothing to do. LTEX should continue to work as it used to do, as LTEX already downloads Java 11 if it fails to find Java on your system. If you want, you can install Java 11+ system-wide on your system to prevent LTEX from redownloading Java after every update of LTEX.

If one of the necessary actions includes updating your installation of Java, LTEX recommends AdoptOpenJDK to do so (although there are many more Java distributions). Just go to https://adoptopenjdk.net/ and click on the blue “Latest release” button, leaving the default settings (OpenJDK 11 (LTS) and HotSpot) as they are.

If you need more choices (e.g., an archive instead of an installer, JRE instead of JDK, or a different platform), click on “Other platforms” instead. As long as you choose a Java version of 11 or newer, you should be good to go. (Note that the JRE suffices for LTEX, but the JDK also works, as the JRE is a subset of the JDK.)

Details on How LTEX Decides Which Java Installation to Use

In order to determine which Java installation to use, LTEX performs the following steps during startup:

  1. Search an installation of Java 11+ on your system (via ltex.java.path and/or the environment variable PATH).
  2. If none can be found, search for Java 11+ in the lib/ directory of the extension.
  3. If none can be found, download Java 11 (via AdoptOpenJDK) to lib/ and use that.
  4. If that doesn’t work, an error is displayed and LTEX cannot be used.

When querying your version of Java with java -version, note that Java 8 identifies itself with a version string of the form 1.8.x, similarly with older Java versions (1.7.x is Java 7 and so on). Starting with Java 9, the version string is given as expected (e.g., Java 11 is 11.x).