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 wíll 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. |
![]() |