These instructions are I210/C155/C201-specific versions of the IntelliJ project creation directions on this page

  1. Select File > New > Project… You will then see the window below pop up. My screen capture is from MacOS.
  1. Make sure Java is selected as the Project type in the upper left corner
  2. Enter a suitable name for the project. I chose HelloC155 in the one I’m creating for these instructions.
  3. Uncheck the Add Sample Code checkbox
  4. Make note of the location where the project folder is on your computer; change to a different location if you need to. Knowing the project location allows you to get to your Java files outside of IntelliJ to upload them to Canvas, open them in other IDE’s, etc.
  5. Click Create. You may see this window appear. Make either choice.
  1. I chose New Window, and voila, a new window appears with my HelloC155 project in it! It’s great except it doesn’t have any Java code in it.
  1. We need to add a new Java file to our project. To do this, right-click on the src folder under our project in the left sidebar, so that a pop-up menu appears. Select New > Java Class, and IntelliJ will prompt you for the name. I’m calling that class HelloC155.
  1. After hitting Return/Enter, the HelloC155.java file has been created. Note the relationship between the class name and the name of the Java file. It’s ClassName.java where here I entered HelloC155 as the ClassName. We should always choose class name’s in Java following an UpperCamelCase convention. Start with an uppercase letter, don’t use spaces to separate words, and begin each new word in the name with a capital letter! Our project now looks like
  1. Our next step is the time-consuming one. Now we have to write some Java code. We need to add a static void main method as the entry point (place where our program starts running) and put some code in the body of that static void main method. Here is a shell for that method:
public class HelloC155 {
    public static void main(String []args)
    {
        // your code goes here
    }
}
  1. If we want this program to be a hello world one that simply prints out hello to us, we can replace the comment with a line of code that does that.
public class HelloC155 {
    public static void main(String []args)
    {
        System.out.println("Hello, C155/C201/I210!");
    }
}
  1. At that point, click the green arrow in the IntelliJ toolbar to run your program and see how it works!