Basic HTML version of Foils prepared September 1 99

Foil 11 Preparing an Applet

From Introduction to Java Language and Applets CPS406/606 Fall Semester 1999 -- September 2 99. by Nancy J. McCracken, Geoffrey C. Fox


1 The applet should be run through javac compiler getting a .class file as before: javac MyApplet.java
2 The resulting file MyApplet.class is then stored in the document collection of a web server (hence has a URL location).
3 Also create an HTML file (say MyApplet.html) with an applet tag to MyApplet.class.
  • <APPLET codebase="http://myserver.org/mydirectory" code = "MyApplet.class" width=300 height=100>
4 When the browser loads the .html file, it will also download the .class file and invoke the java interpreter to run the init, start, and paint methods.

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Wed Sep 1 1999