Monday, December 28, 2009

Java Eclipse Usage

Here is the step by step usage of Eclipse IDE to run Java programs. I will show you how to run a "hello world" program in Eclipse.

step 1. After installing Eclipse, double click on eclipse.exe in the eclipse folder.

----------------------------------------------------------------------------------

step 2. In the Select a workspace tab, give the path where you want your java programs to be. eg: see the screen shot.



----------------------------------------------------------------------------------

step 3. close the welcome window.



----------------------------------------------------------------------------------

step 4. Click on File > new > Java Project.



----------------------------------------------------------------------------------

step 5. A new window "New Java Project" opens, in the "Project name" tab, fill in your project name, eg: hellomyworld. and click on Finish and NOT next.



----------------------------------------------------------------------------------

step 6. Right click on the "hellomyworld" in the left side and the click "new" and then "file" and a "New File" window will open. Fill in your java file name(make sure that the file name and class name which has main method are the same) and then click Finish.





----------------------------------------------------------------------------------

step 7. In the left side, click on the plus maek beside "hellomyworld", do this similarly to "JRE System Library". Then drag the file from "JRE System Library" to src.



----------------------------------------------------------------------------------

step 8. Write your hello world program in the file "helloworld2.java" by clicking on it in the left side.



----------------------------------------------------------------------------------

step 9. click on the run button (green color) and then check the output in the below window.



Thats it guys, happy programming!!

No comments:

Post a Comment