Skip to content

Setting up Java for Tetrad

Joseph Ramsey edited this page Mar 31, 2023 · 105 revisions

First, click here if you're already an expert at installing Java and want some tips.

If you are a non-expert, this page will explain how to install Java for Tetrad (if you need to).

Some interesting background that might help you understand:

  • The abbreviation "JDK" stands for "Java Development Kit" and includes a JRE ("Java Runtime Environment").
  • Installing a JDK ("Java Development Kit") will install Java on your machine.
  • Java JDKs are offered by various companies--Oracle, Amazon ("Corretto"), Adoptium ["Eclipse Tumerin"), Microsoft, IBM, Redhat, etc.
  • Version number for Java may include different integers separated by periods, indicating subversions--e.g., 9.1, 9.1.2, etc.; the "major version" is the first number in this period-separated list--for these examples, "9". For 11.3.2, the major version would be "11".
  • Major versions for Java range start at 8 (also called "1.8") and go up to 17 or 20. Earlier versions of Java are no longer available.
  • You might have Mac, Windows machine, or a Linux machine; the installation instructions will differ depending on your operating system.

You must have (or install) a major version 9 or higher for Tetrad.

You may already have a JDK installed on your machine from one of these companies with a major version of 9 or higher, in which case you only need to do a further installation if you want to update your Java anyway.

For instance, you may want the latest Java to make sure the latest issues have been fixed.

So...

First, check the version to see if you already have Java with a major version greater than or equal to 9

Open a Terminal window on Mac or Linux or a Command prompt on Windows.

On a Mac, you can hold down the command key, type a space, then type Terminal and return.

Once you have a Terminal open, type the following:

java -version

If a Java JDK is installed, this will print (among other things) the version number of the JDK (for example, "1.8", "8.2", "10.5.3", etc.). You'll have to look for the version number in the printed text. If no version number is printed, you don't have Java installed, so you'll have to install it.

You may close the terminal window using the usual method for closing windows on your machine.

If you already have a version with major version number 9 or higher (e.g., 9.2, 11.5, 17.32), you do not need to install a new version of Java.

You can if you like, but you won't have to unless you're worried that Java's latest issues have been fixed.

If the major version number is 8 (i.e., version 1.8), you must install a newer version to run Tetrad (major version 9 or higher).

If you need (or want) to install a newer version of Java, we suggest installing a Java JDK from Oracle.

We recommend an Oracle JDK installation with the latest version number and long-term support (LTS).

You must go to the Java Downloads page for Oracle to install Java:

https://www.oracle.com/java/technologies/downloads/{:target="_blank" rel="noopener"}

Here are some tips to follow when downloading--you must make certain choices.

Do not click on the button "Java for Consumers"; this is irrelevant to Tetrad.

Instead, do the following.

First, find where it says "Java 17" and "Java 20"; select one of these (it doesn't matter--17 is more usual).

Second, find where it gives the three machine types--Linux, Mac, and Windows. Select your machine type. (Important!)

Now the instructions depend on which machine type you have. You need to select which install file to download.

For Mac, select the "x64 DMG Installer" option.

  • If you have an ARM processor, you may select the "Arm 64 DMG Installer" option instead but don't do this unless you know you have an ARM chip. (You'd have to check your machine specs; if they don't say you have an ARM chip, then you don't have one. It might say "AMD" or "aarch64" or "Apple M1" instead of "ARM.")
  • Click on the corresponding file name to the right to download the installer
  • After downloading, double-click on the file (where you've downloaded it to) and follow the instructions in the window that comes up

For Windows, select the "x64 MSI Installer" option.

  • You may optionally prefer the "x64 Installer" option if you prefer installing using ".exe" files; both should work
  • Click on the corresponding file name to download it
  • After downloading, double-click on the file (where you've downloaded it to) and follow the instructions in the window that comes up

If you're installing on Linux, we will assume you know how to do this installation.