How to create and run a Java Hello World application using Eclipse

A Java “Hello World” application is usually the first application to write when we learn Java. This application simply outputs the world “Hello World!” on the screen. Follow the steps below to create this application using Eclipse IDE.

Right click on the Package Explorer or Project Explorer view and choose New -> Java Project

Enter the project name “HelloWorld” and click on the Finish button

Expand HelloWorld, right click on src -> New -> Class

Enter the Package Name, Class Name, check the “public static void main(String[] args)” checkbox, then click on Finish

Type System.out.println("Hello World!"); in the main method as per screenshot below, save the HelloWorld.java file (Command+S for MacOS or Ctrl+S for Windows), and click on the Run button to execute the Hello World Java application.

Check the Console to see that “Hello World!” has been displayed. Congratulations you have successfully developed the Hello World Java application using Eclipse IDE.