Simjava examples

Applet examples: Stand-alone examples (the links below point at source code not applets):

Notes on running examples

Makefiles are provided with all examples, so they can be compiled and run using:
make
make run
in their directory.

Appletviewer, browsers and jars

When run from the command line, appletviewer and java look for class files in the CLASSPATH directory (set in makefile.config).

When running an applet from a browser, it looks for class files in the codebase directory specified in the .html file, or in the directory with the html file.

It is appealing to archive all .class and bitmap files into an archive, or JAR, as this cuts down on network transfer time. However, when developing simulations it is more convenient to access the .classes normally, since there are then no security restrictions preventing writing of files - for some reason these restrictions seem to apply even to code in locally generated Jar files. For this reason, two .html files are given in each applet example; index.html for use by appletviewer, and jarindex.html for use by a web browser. The following html clips show various ways of including a simulation in a web page.

Browsers and JDK 1.1

All the examples are compiled with JDK1.1, so will not run from older browsers which only support Java 1.0.

HotJava can be used to run JDK 1.1 applets (and the links above have been tested with this). It is best to use jar files with HotJava - HotJava has problems loading class flies directly from two different locations (i.e. the example directory plus the simjava directory). The jarindex.html files provide the jars.


Fred Howell
Last modified: Thu Aug 7 15:39:37 BST 1997