Run HelloWorld
- Run a Java program in IntelliJ.
Next, we want to "run" the HelloWorld.java
file in IntelliJ. You will notice a green "play" button next to the main
method.
What if I don't see the green play button?
Let's ensure the project settings are correct.
- Go to the "File" menu and open "Project Structure."
- On the left pane, look under "Project Settings" and select "Project."
- Make sure the "Project SDK" is set to 1.8.
- Make sure the "Project Language Level" is set to 8.
Click on the play button to run the program; you must see "Hello World" printed on the output panel.
Aside: You may have noticed a green play button next to the HelloWrold
class declaration. You can alternatively run the program using this button. The process is identical.