Writing Java applets

You can write your applets on any machine where you have access to any version of JDK and then put them on the class web server. The instructions below are how to do it on carver.

Remember that to write an applet, you must prepare a file called something like myprogram.java and compile it as usual:

javac myprogram.java
producing a file myprogram.class. Then you must prepare a file myprogram.html which has an applet tag to myprogram.class.

To view your applet, place all your files in your web directory. To run appletviewer, execute the following line:

 appletviewer myprogram.html
Appletviewer will bring up a window with just the applet part of the html page. This is especially useful while you're debugging.

You can also view your applet via a web browser. In the browser, either enter the URL of your web directory and your HTML file name at the end, or just open the HTML file using File | Open feature in the menus of your browser