To Examples Page
Creating a Hello World Project
IntelliJ directions for creating a Hello World project.
- Open the IntelliJ IDE.
- In the Welcome to IntelliJ IDEA Dialog, click on the Create New Project
Link.
- 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.
- Leave the Create Project from Template box unchecked. Click Next.
- 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.
- Now create the class file Hello.java.
- 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.
- 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.