The relative location of JAR files

When SoundSafe protects a track it produces two files, the "JAR" file (that may also encapsulates the sound file) and the applet that is used to view it, plus an HTML file that runs the applet. SoundSafe makes the assumption that the HTML file and the JAR file are both in the same directory on a server but this may not be valid.

Sometimes it is necessary to place a SoundSafe "JAR" file in a different directory to the HTML file. Free websites like HOTBOT insist on this. For instance, in the case of HOTBOT the "JAR" file will be put in a subdirectory called "images" when it is uploaded and the user has no choice about this. If the JAR file is put in a different directory to the HTML file the created HTML must be altered.

If the JAR file is called "sound.jar" then the HTML line created by SoundSafe

archive="sound.jar"

should then be changed to

archive="images/sound.jar"

SoundSafe can make these HTML changes automatically by turning on the appropriate option in the "Origin" option tab as shown below.

Here we have told SoundSafe the JAR file will be in a directory "dir3" which is underneath "dir2" which is underneath "dir1" relative to the HTML file on the server. Three directory levels is extreme, normally there would only be one but this example illustrates what can be done. When SoundSafe generates the HTML and JAR files it also creates the directory structure locally as well.

Products like Frontpage can be used to edit the HTML files that SoundSafe produces and as already discussed on the basics page there is no problem putting multiple SoundSafe applets on a single webpage. The code between the applet......../applet tags should be cut and pasted into the composite webpage but the JAR file for each image remains separate.