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

using jar with applets

Francisco Castillo

Joined: Oct 01, 2006
Posts: 3

Does it possible to use jar tool for applets? I've tried to do it in netbeans, but I get next message to run the jar file generated:

Failed to load Main-Class manifest attribute form


Thanks a lot, in advance
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Yes, applets can be delivered as jar files. In fact, that's the most common method in which they are deployed. But applets do not use a class having a "main" method like applications do, so they have no Main-Class attribute in the manifest.

To run the applet you'll need an HTML file that contains an <applet> tag, which is described in detail on this page of the Java Tutorial.

It could be as simple as
Maki Jav
Ranch Hand

Joined: May 09, 2002
Posts: 439
Well said Ulf

We have come face to face in 8 posts and this is the ninth

Maki Jav

Help gets you when you need it!
I agree. Here's the link:
subject: using jar with applets
It's not a secret anymore!