This article explains method to create hello world program in Eclipse. Also to run it after creating the program.
Creating java project
- Select Menu file to New to Java project (New java project Wiza4d Dialog pops up),
Enter “Program” as the project name and keep rest of the settings default,
Click finish, ellipse IDE will generate the java project (“Program”).
Creating package
- Here, right click on src and select context menu New to package,
Then, enter “code” at name field and keep rest crieteria as it is,
Click finish, package(code) will be generated.
Creating java class
- Now, right click on package(code) and select context menu New to class,
Then, enter “First” at name field and select checkbox for ‘public static void main(String[] args),
Click finish, java class(first) will be generated.
Creating “Hello World” program
- Edit the generated “First” java class as per the following code below,
- Then, run the code by right click on class to run as to java application (or by executing circular run option at top left),
Or
- Your code will be printed “Hello World” in eclipse console.
Comments