File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Archive problem. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Archive problem." Watch "Archive problem." New topic

Archive problem.

Mariam A. Shamsi

Joined: Dec 15, 2008
Posts: 16
Hello all,

I have the following dir:

My applet tag is as follow:

When running the applet, the applet start but the jars are not found. Could you please let
me know where is the problem?
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403

The archive attribute does not support wildcards and the browser can't know which jar files there are in a server directory. You need to list all files explicitly, separated by commas.

Ujjwal B Soni <baroda, gujarat, india> <+918866008962>
"Helping hands are better than praying lips......"
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
The "archive" attribute lists just the names of the jar files, not any directory information. If the jar files are not in the same directory as the HTML file containing the applet, then the applet tag needs to contain a "codebase" attribute. Note that this is used for finding loose class files as well, which means that the file layout you currently have will not work. You'll need to move the jar files up a level.

By the way, I don't see any wildcards in the applet tag, so I'm not sure what Ujjwal's comment is about.
I agree. Here's the link:
subject: Archive problem.
It's not a secret anymore!