Answer: Suppose the code you want to run compiles to A.class. Then, create a file a.html with the contents:
<applet code="A.class" height=400 width=500></applet>and invoke
appletviewer a.htmlfrom the directory containing a.html and A.class. If you want the class to be in a different directory use something like
<applet codebase="the_directory" code="A.class" height=...>Check the documentation for exactly how this is supposed to look. Of course, you can change the values of height and width to suit your applet.