Exercise 8: Building and Running the Project
In this exercise, you will build the Calculator project. You will then generate an HTML file that runs the Calculator project.
- Click the Build Manager control
on the Java WorkShop tool bar.
The Layout window closes, and the Build Manager opens with your Calculator project loaded.
- Click the Initiate a Build control
on the Build Manager tool bar.
The WorkShop compiles the Calculator.java program into the Calculator.class file of byte code. The status line reads "Build Succeeded" when the build is complete. You should not get any error messages in the source code. If you mistyped one of the button names, fix the error as follows:
- Open Visual Java.
- Select the button in the layout window.
- Enter the correct name in the Name field in Visual Java and press Return or Enter.
- Open the Build Manager and rebuild the project.
- Click the Project Tester control
on the WorkShop tool bar.
The WorkShop generates the HTML file Calculator.tmp.html in your project directory. The HTML file includes the <applet> tag, which specifies the options to
use when placing the Calculator project on a Web page. The WorkShop loads the file into the Web browser. Try out the calculator.
- To stop the running project, click on any tool in the tool bar.
Next lesson:
- You have completed the lessons in this tutorial.