logosetup
Return to SetUp Menu |  JavaBitsNotebook.com | MathBits.com | Terms of Use  | JavaMathBits.com

Tasks using Eclipse

By now, you should have created your workspace folder, or have been told where the folder will be located.

The Second Task

For this second task with Eclipse, you will be creating a project, creating a class, typing in a program and running the program.

The program you will be typing, shown below, is to be called HelloWorld.java.

helloworld

Access your Eclipse software and have it open on the screen.

Click on File on the menu bar, click on New, and then on Java Project.

     The "New Java Project" wizard (drop down window) will open.

     Enter your project "name". Remember: The project name cannot be the same as the .java name. You cannot name this project "HelloWorld".

     Notice that "Use default location" will be checked and automatically filled with the location of your designated Eclipse workspace.

     Leave the default items under JRE and Project layout checked.  

     Click Finish.   

newprojectpic

• In the Package Explorer (left hand panel) of Eclipse, expand your named project (ours is named Task2) and select the src (source) folder.

     Right click and choose New - Class.

preloadclip
     The Java Class wizard (drop down window) will appear.

The Source folder will be automatically set to coordinate with your project name. Leave it as is.
Leave the Package blank.
Under Name, type HelloWorld (all one word).
Under Name, the radio button for public will be checked. Leave it checked.
Further down the screen, you will want to check public static void main (String[] args). It will save you a little typing time.
Click Finish.
             javaclass       

• In the editor window, you will see a couple of lines already typed for you.

• Delete the comment line // TODO Auto-generated method stub

• You are ready to start typing.

• To RUN the program, choose run on the top menu bar.

divider
Return to SetUp Menu |  JavaBitsNotebook.com | MathBits.com | Terms of Use  | JavaMathBits.com

Notice: These materials are free for your on-line use at this site, but are not free for the taking.
Please do not copy these materials or re-post them to the Internet, as it is copyright infringement.
If you wish hardcopies of these materials, refer to our subscription area, JavaMathBits.com.
Help us keep these resources free. Thank you.