Saturday, November 6, 2010

How to compile java program in Eclipse IDE

We all know Eclipse is an IDE (integrated development environment) for Java.We have many IDE but I prefer Eclipse.

Start with First Download Eclipse  and J2SE (JDK kit).(Download ECLIPSE) and (Download Java).

You will get Eclipse in Winrar file extract it.And then double click on eclipse.exe icon to start.

How to start a java program?
After installing Eclipse,a window will open.
Go to File--->New-->(Click)Java project.
Then a window appears give a name to your project.then click finish.

Right side you will find folder with your project name, if you expand it, src folder is found right click on it and new --->package.A window appears give the same name as your project name.
then right click on package folder at right side and click new --->class.

A window appears then give your class name as shown in figure.


                                                            
                                                              Click on Image to view


  Now click finish then your are done to write code.After writing code.

Right click on ".java" file (you will find it on right side of window), Click Run as -->Java application.

Below you can see the out put.

1 comment:

  1. this site is great for student like me
    thank you for sharing !!!

    im not great in school because my professor is not good in teaching JAVA

    ReplyDelete