Java on the Macintosh

Running Java using Metrowerks
  1. Open Codewarrior IDE and choose New Project from the File menu.

  2. Click on the arrow next to Java to display the submenu and choose Java Application or Java Applet.

  3. Quit Metrowerks Java each time you run an applet or program.

    Application

    1. Click on the arrow next to Sources to open the Sources folder in the Project Window.

    2. Add desired files by choosing Add Files from the Project Menu. Then move the added files to the Sources folder.

    3. Remove TrivialAppication.java by selecting it and choosing Remove Selected Items from the Project menu.

    4. Go to Java application settings under the Edit menu, select Java Target, and change the name of the Main Class. (Remember that Java is case sensitive.)

    5. Choose Run from the Project menu.

    Applet

    Most of the steps are the same as the above. Refer to How to change a Java Application to an Applet to determine how to write Java applets.

    1. Click on the arrow next to Sources to open the Sources folder in the Project Window.

    2. Modify the "TrivialApplet.html" file so that the name of your applet is used instead of the name "TrivialApplet"

    3. Modify the width and height sizes in "TrivialApplet.html" to your desired sizes.

    4. The "codebase" tag within the HTML file tells the computer where to find the compiled file. By default, Codewarrior puts it in a folder called TrivialApplet. It is easiest to let Codewarrior place the compiled java file in the TrivialApplet folder, but you can change this option.

    5. Remove TrivialApplet.java by selecting it and choosing Remove Selected Items from the Project menu.

    6. Add desired files by choosing Add Files from the Project Menu. Then move the added files to the Sources folder.

    7. Choose Run from the Project menu.

Updated 19 August 1999.