Skip to content

Setting up Tetrad in IntelliJ IDEA

Joseph Ramsey edited this page Dec 19, 2015 · 33 revisions

If these instructions don't work for you, please let us know. (Just open an issue at https://github.com/cmu-phil/tetrad/issues.) If someone wants to add instructions for setting up Tetrad in Eclipse, feel free.

  1. Google, download and install the latest IntelliJ IDEA CE (free). The IDEA version needs to be at least version 15 for these instructions to work.

  2. If you don't have the latest Java installed, install it. Google "oracle java download" and choose the latest JDK for your platform. The Java version needs to be at least version 1.8.

  3. Fork the Tetrad repository and clone it to your desktop. Figure out where it went. On a Mac, it went to your Documents folder.

  4. Open up IntelliJ.

  5. Select File->New->Project from Existing Sources.

  6. Find the folder for the Tetrad project you just cloned to your desktop. Select the "pom.xml" file just inside of it. (Careful, there are "pom.xml" files inside of subfolders. Don't pick those.)

  7. Click OK until the project is set up. If it asks you to add git root, say yes. If it gives you a choice of Java versions, choose the latest, 1.8 or higher. (Choose the most recent version if given a choice.) If it asks you whether you want to set it up as a Maven project, say yes. Please, say yes. You may need to tell it where your Java JDK is if you just downloaded one.

  8. Click Maven Projects on the right margin. If you don't see it, there is a button in the lower left corner of the IntelliJ window that will reveal it.

  9. Double click Tetrad->Lifecycle->compile. This operation may take a while. It has to download all of the dependent jars etc.

  10. From the Navigate menu select Class...

  11. Type "Tetrad"; select Tetrad in edu.cmu.tetradapp.

  12. When the class comes up in the editor, right-click (command-click) on the name of the class ("Tetrad") and select Run 'Tetrad.main()'.