-
Notifications
You must be signed in to change notification settings - Fork 113
Setting up Tetrad in IntelliJ IDEA
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.
-
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.
-
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.
-
Fork the Tetrad repository and clone it to your desktop. Figure out where it went. On a Mac, it went to your Documents folder.
-
Open up IntelliJ.
-
Select File->New->Project from Existing Sources.
-
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.)
-
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 1.7 or higher. Preferably 1.8. (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 you Java JDK is if you just downloaded one.
-
Click Maven Projects on the right margin.
-
Double click Tetrad->Lifecycle->compile. This operation may take a while. It has to download all of the dependent jars etc.
-
Select Edit Configurations from the drop-down near the top margin.
-
Click + -> Application.
-
Set Name to "Tetrad."
-
For "Main Class" click the three dots to the right and type Tetrad. Then select Tetrad. Click OK.
-
For VM Options, type "-Xmx8g", or the amount of memory you have. (That was 8G.)
-
Select module "tetrad."
-
Click OK.
-
Click the little green triangle to the right of the dropdown. The GUI should launch.
Please forgive; we have been working hard to fix up Tetrad so that it can be put out for public consumption; it was a lot less public for some 15 years. As a result, the repository has been changing a lot lately, and IntelliJ sometimes has trouble keeping up. If you're having problems, try the following:
(at the tetrad prompt:) git reset --hard
Then delete all of the .iml files. (There are 3 of them.) Also, delete the entire .idea directory.
Then in IntelliJ, File->New->New repository from existing sources. Select the tetrad directory. Go through the setup process again. Accept root. Set up as a Maven project.
(at the tetrad prompt:) mvn package
It should be reset back to normal.
Hopefully, things will normalize soon.