Quantcast
Viewing all articles
Browse latest Browse all 40

Eclipse | Hello World Java Project

This article is abut how to start with eclipse hello world java project.

Prerequisite: Java must be installed.

In eclipse click on File -> New Project -> Java Project (as below)

Image may be NSFW.
Clik here to view.
1

It will open new java project wizard. (as below)

Enter a valid a project name in project name text box. Click next (or one can directly click on finish also)

Image may be NSFW.
Clik here to view.
2

Click on finish on next wizard page. (as below)

Image may be NSFW.
Clik here to view.
3

Now create a new java class in src package. 

Image may be NSFW.
Clik here to view.
4

On click of class will open a page for new class entry. Enter valid class name in name text box.

Also check main method check box as below. It will create a main method in class itself.

Image may be NSFW.
Clik here to view.
5

Now a add sys out statement in main method. (as below)

  1. public class Main {
  2. public static void main(String[] args) {
  3. System.out.println("Hello World !!!");
  4. }
  5. }

Noe one can run this as java application. (as below)

Image may be NSFW.
Clik here to view.
6

It will first compile and then run TestProject application.

On console it will print result. ‘Hello World !!!’

Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 40

Trending Articles