Setting up Java for Tetrad For Experts - cmu-phil/tetrad GitHub Wiki

If you're already an expert at setting up software using wizards and command-line options, myriad options exist for installing Java JDKs with various characteristics. Your group may already be using a particular one. The only advice you may need is to install version 11 or higher if you want the Tetrad data loader to work. If you don't like the advice below, send us better, succinct advice, and we'll include it on this page!

If you're not an expert, see our page for non-experts.

Some notes:

  • The important thing is that you install a JDK with major version 17 or higher; the vendor is unimportant, though starting January 2024, all published jars will be compiled under Corretto's JDK 17, which is an optimized OpenJDK build with some additional features (which we don't use).
  • You may prefer some other build of OpenJDK, such as Microsoft's or Redhat's, or IBM's, or Oracle's, or Amazon's Corretto, or Adoptium's Eclipse Temurin
  • You may prefer a build that enforces OpenJDK standards with nothing extra. Microsoft's build, for instance, does this.
  • If you use brew on a Mac, you may install Java through brew, though be sure to install version 17 or higher.
  • If you use anaconda (conda) on a Mac, you may install Java through anaconda
  • For Windows, Microsoft's, Oracle's and Amazon's are options that we've tested with Tetrad. The installers for them already set all the environment variables for you, so you don't have to worry about it. Still, if you want to refrain from using those installers, there are articles about how to do it online, so google away!
  • If you're installing Java on Linux and don't want to use the options above, you are already in ultra-expert mode, so google for a way to do that for your Linux distro if you don't know how

Many other options are available!

  • For instance, there are high-performance options like GraalVM or Zulu that you may like
  • If you're a Java programmer setting Tetrad up in IntelliJ IDEA, it can download and install various JDKs from a dropdown menu, including many options other than the ones listed here. However, we recommend a build that enforces OpenJDK standards, such as Microsoft's, if you want to create jars that everyone can use, regardless of which build of OpenJDK they use (11+). You can download the Microsoft build for your platform and import it into IntelliJ using the Project Settings menu item.