HELP! * GREY=local LOCAL HTML version of Foils prepared 29 January 1996

Foil 30 Applications Versus Applets - II

From CPS616 Lectures on Java CPS616 Basic Information Track for Computational Science -- Winter-Spring Semester 96. by Geoffrey C. Fox * See also color IMAGE

Applets should NOT have main method but rather init, stop, paint etc.
They should be run through javac compiler getting a .class file as before
Create an HTML file (say HelloWorld.HTML in same directory as .class file) and include in this
<applet code="Example.class" width=500 height=200 > </applet> in simplest case with no parameters where applet will run in window of given width and height (in pixels)
If you have JDK on one's machine, one can run the applet with appletviewer HelloWorld.html
Alternatively run Netscape 2.0 essentially anywhere and applet is interpreted and run by Java interpreter built into Netscape.
This way we can compile on places with JDK installed but run almost anywhere!



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 Tue Feb 18 1997