This document is intended to help you through frequently encountered weird technical failure scenarios (WTFS) in IntelliJ. It will be populated as questions arise.
I can’t run my Java files
If your files look like this then you haven’t properly imported the project. When starting an assignment for the first time, you must import the project instead of opening. To fix this, close the project (from the “File” menu, choose “Close Project”). And then “Import Project”.
Variables show up as red in IntelliJ
This means that you forgot to add javalib
as a library for this project! Every time you start a new assignment you must re-add the javalib. To do this, under the “File” menu, choose “Project Structure” and “Libraries”, and then add the javalib
inside your repo.
Everything looks right but it still doesn’t work!
Sometimes the easiest thing is to simply do it all over again. Even if you know you just did everything correctly, starting over very often just fixes the problem. First close the project (from the “File” menu, choose “Close Project”) and then reimport the project from the beginning.