Skip to content

Installing Java

Andrew Lygin edited this page Sep 8, 2019 · 7 revisions

Why Java?

The extension uses the official TLA+ tools to support such features as PlusCal-to-TLA+ translation, module parsing, model checking etc. These tools need JVM (Java Virtual Machine) to run, and the extension doesn't come with a JVM onboard. Thus, it requires a JVM to be installed on the user's computer.

Attention! At the moment, the TLA+ tools can be used with Java 8, yet it's strongly recommended to use Java 11 or higher.

Check the existing JVM installation

The simplest way to check if you already have a JVM installed is to run the following command in the command line:

java --version

If there's a JVM on your computer, and it's properly configured, you'll see the information about its version. Version 1.8 is what we call Java 8 here.

BTW, the extension performs this check for you from time to time and shows the message "Java executable not found. Check the Java Home configuration property." if it cannot find a JVM or if your JVM version is not supported.

Install JVM

If there's no JVM on your computer, you can download and install one of the distributives. The most popular are the following:

  • AdoptOpenJDK — the TLA+ Toolbox uses this one.
  • GraalVM — a JVM with a brand-new compiler, works faster in most cases.
  • Amazon Corretto — the JVM distributive from Amazon.

Configure the Extension

Sometimes, you may not want to use the extension with your globally enabled JVM (the one that is executed when you execute the java command in the command line). In such cases you need to tell the extension where to find the JVM you want to use.

To do this, open the Settings panel, find the TLA+ group of setting, and provide the home directory of your JVM in the Java: Home setting. Be careful, the JVM home directory is the directory where the whole JVM resides, not the full path to the java executable.

Clone this wiki locally