IntelliJ Project Setup

(Return to homepage)

Sometimes IntelliJ isn't intelligent enough to infer project structure or pick the right Java compiler. If you're having trouble running your code, try going through the following steps. Start by opening the project folder from the File > Open... dialogue box.

Next, open the project settings by clicking File > Project Structure.

On the Project Settings tab, make sure the correct Java Project SDK is selected and the language level is set to SDK default. Also check that there is an output directory present; if not, go ahead and make a new out directory in the project root and configure the output directory to point there.

Next, in the Project Modules tab, make sure the src directory is considered a source directory (highlighted blue). If not, right click on the src directory and check the Sources box.

Finally, in the Project Libraries tab, make sure that the src/lib directory is considered a library. The lib folder is where the jUnit 4 JAR resides. If not, click on the circled "+" icon and navigate to the lib folder.

Completing these steps should be sufficient to get running and debugging working. Have questions or need help? Post on Piazza!

(Return to homepage)