This lab steps through the mechanics of compiling and running applets,
using the light example from class.
- Look at my version of the LightAppletV1Demo.html
- Save versions of each of the listed java source files in your
- Save the LightAppletV1Demo.html file itself in your
- Edit the html file so that all of the URLS and
refer to your base URL
- Compile the java files. Usually, the easiest and best way to
compile is from within emacs. For example, when editing java files
hit the F6 key, then
backspace over the prompt saying ``make -k'' and replace with,
in this case, ``javac Light*.java''
- From a shell window, type
- You will see that there is an error leading to a
null pointer exception. (One of the source files
is not actually the same as the ones that produce the running
- Track down the error (hint: look in LightSwitch), fix it,
recompile, and rerun the appletviewer. Repeat as necessary
until it works.
- When the applet works:
- From your public-html directory, type
chmod og+r LightAppletV1Demo.html
- From your public-html/classes/csc241 directory, type
chmod og+r *.class
- Edit your home page (or somewhere easily and obviously
accessible from your home page) to place a link to your
- Check that it is accessible and works from netscape.
Last modified: Fri Sep 20 07:11:19 EDT 1996