To Examples Page

Creating a Hello World Project

IntelliJ directions for creating a Hello World project.

  1. Open the IntelliJ IDE.
  2. In the Welcome to IntelliJ IDEA Dialog, click on the Create New Project Link.
  3. In the resulting New Project Dialog, leave Java selected and if necessary, set the Project SDK to the home folder of the Java software that you are using. The labs are using OpenJDK. Don't check the Groovy or Kotlin/JVM boxes. Click Next.
  4. Leave the Create Project from Template box unchecked. Click Next.
  5. Enter the Project Name as HelloWorld. Specify the location of the project folder. For example, the project folder could be
    C:\it313\examples\HelloWorld
    
    Note: the last file in the path is HelloWorld. Click Finish.
  6. Now create the class file Hello.java.
    1. Right click on the src file and select New >> Java Class.  Enter the name Hello for the class in the Create New Class Dialog. The source code
      public class Hello {
      }
      
      has been created. Replace this source code with the source code in the Hello.java file of the HelloWorld example project.
  7. Compile and run the project by clicking on either of the green arrows to the left of the source code on lines 8 or 10. The output
    Hello, World!
    
    appears in the Run Window at the bottom of the IDE.