The relative location of JAR files

When image safe protects an image it produces two files, the "JAR" file that encapsulates the image and the applet that is used to view it, plus an HTML file that runs the applet. ImageSafe 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 an ImageSafe "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 "pic.jar" then the HTML line created by ImageSafe

archive="pic.jar"

should then be changed to

archive="images/pic.jar"

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

Here we have told ImageSafe 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 ImageSafe 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 ImageSafe produces and as already discussed on the basics page there is no problem putting multiple ImageSafe 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.