How to Create Save and Run Java Program in Eclipse

In this class, We discuss How to Create Save and Run Java Program in Eclipse.

The reader can take all the computer science subjects. Click here.

We will show you how to run the java programs in eclipse IDE.

In our coming classes, we will use the same IDE for the entire java course.

The same IDE is used in our Full Stack Web Development course.

After opening the eclipse IDE, we need to create a new project.

Click on File in the new go-to java project.

Give the project name and click the specific radio button showing JDK-19.

JDK-19 is the java development kit installed in our system.

Click on a finish to create a new project.

The newly created project is visible in the left block.

Click on the project folder we will get the SRC folder.

We will create and execute new java files in the SRC folder.

Right-click on SRC and click on the new class file.

Give the name of the class file.

Which method stubs do you like to create?

We go with public static void main(String args[])

Click on create to create a new java class file.

Observe the file name and class name are the same.

In java, we should have both file names and class names are same.

We start writing the code in the public static void main(String args[]) method.

We are displaying “Hello World” in our program.

System.out.println(“hello world”); to display the output hello world.

If we need to execute our program, right-click on the file name and click run as a java program.

We go with the shortcut symbol shown above the left corner.

The output is shown in the bottom block named console.

The errors are also shown in the console block.

We showed the execution step-by-step in the video.