Home > Posts > Specifying .JAR file dependencies (at APPLET tag’s ARCHIVE parameter or at JAR’s manifest file)

Specifying .JAR file dependencies (at APPLET tag’s ARCHIVE parameter or at JAR’s manifest file)

To specify multiple .JAR files at HTML APPLET’s tag ARCHIVE parameter, edit the applet tag in the HTML page and change the following parameter:

ARCHIVE = "myapplet.jar"

to say

ARCHIVE = "myapplet.jar,lib/jbcl-rt.jar,lib/jgl.zip"

assuming you place all those JAR files together on the server (the “lib/…” ones in a subfolder called “lib”) with the HTML file.  Note that the proper separator at the archive parameter is a comma, not the semicolon typically used in CLASSPATH values.

In newer Java versions a .JAR can also reference other .JAR files (dependencies) in it’s included manifest.mf file, which is the preferred method. Note below that a space is used as the separator.

Main-Class: com.somecompany.someproduct.Main
Class-Path: lib/jbcl-rt.jar lib/jgl.zip

Useful reading:

Advertisements
Categories: Posts Tags:
  1. No comments yet.
  1. 2012/06/09 at 10:39

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: