P R E V I O U S   N E X T

JavaLessons.com

Building and testing Java software with Eclipse IDE 2/3

A short guide for beginners who want to work with Java in Eclipse

Right-click the name of the project and choose New, Class.

( NOTES :
Build path can be chosen to add external source folders to the project.
Import can be chosen to copy files into a project.
You can choose Export to zip applications into jars, wars and ears, later on. )



Fill in the name of the class that extends java.applet.Applet. The warning about the missing package name can be ignored for applets.



Select the source file name and then click the tiny button marked in the image, then choose Run As, Java Applet. The source file is compiled when you save it and if the compiler hasn't detected any errors, the applet runs inside the applet viewer and can now be tested.
( Tested extensively, you wll do that, won't you ? Promise ? With anything you're going to build ?)

Next time you can just press the larger button encircled.

Choosing Window, Preferences, General to have your work saved each time before running it, is always a smart move. You can also do this manually : Ctrl+Shift+s
The option can be found in General-Workspace in later releases.

P R E V I O U S   N E X T

JavaLessons.com

Copyright © 2005 SEMM (NL) All rights reserved. Author : Paul Hamaker
Contents and graphics contained throughout this web site have been registered.
Javatm is a Sun Microsystems, Inc. trademark.