.html
. It is possible for a project to have several applets, each with its own .html
file. Some of the things about running applets are similar to running applications, but some are different. Please read below about how to run applets.
An aplet project consists of the project file, one or more Java files, and one or more HTML files. You will be able to identify the project files by the .mcp extension (stands for Metroworks CodeWarrior Project) and the Code Warrior project file icon shown below.
Note the difference from a .java file icon below:
Note that the window has 3 tabs: Files, which shows you the files included in the project, Link Order, which allows you to specify the order of compilation of your files, and Targets. For the first few weeks you will only be using Files.
If you have changed a file, you can tell that it has been changed by looking at the project file window. A red check mark appears after files which need to be brought up to date.
If the compilation was successful, i.e. there are no error messages, choose Run from the project menu (or press Apple-R):
You can also use Reset button to clear, and Step button to run the code step-by-step.
All printing of your program and all messages about errors during execution are printed to a console window whichj pops up when the first printing or error message needs to be displayed:
Correct the error:
Then re-make your program as shown in the previous step. It is a good idea to just fix one error at a time and then try to re-make your code again.
If the Apple Applet Runner is running, select it from the active applications (the icon in the upper right corner of your machine). Then choose Quit from the File menu.