STools Version 4 |
Physlets are based a common class library that we refer to as Science Tools for Java Programmers. We are now distributing this library as a Java Archive file, STools4.jar, so that others can write applets that use the technology that we have developed. The new library has extended functionality and different organization from previous STools packages. Physlets are now being recompiled to to use this new archive.
Only minor changes need to be made to scripts in order to incorporate the new package.
For example, Animator and DataGraph applets can be embedded on the same page and communicate using data connections if their archive attributes are written as follows:
archive="Animator4_.jar,DataGraph4_.jar,STools4.jar"
instead of the old
archive="Animator_.jar,DataGraph_.jar,SGraphics.jar,STools.jar"
Finally, we should explain our notation. We usually break up Physlet jar files to remove common class libraries. Almost all Physlets require numerical methods and graphics toolkits from STools4.jar. Rather than including this library with every Physlet, we prefer to provide Physlet jar files without this common library. These abbreviated jar files have an underscore appended archive name.
Animator4.jar -> Animator4_.jar, STools4.jar
DataGraph4.jar -> DataGraph4_.jar, STools4.jar
DataTable4.jar -> DataTable4_.jar, STools4.jar
Multiple applets can then be specified in comma delimited list as shown above. Embedding a Physlet by specifying multiple jar files should not increase and may decrease download time, since jar files are only downloaded once no matter how many times they appear on a page.