Tank
Tank

Reputation: 25

java applet export a jar file as an standalone executable

I've been looking around for the solution but no one can solve the question I have.

I have an applet created by using eclipse and I would like to export it as a jar file so that others can use it easily.

The way I used for generating .jar file is in the following steps:

right click the project --> select export --> select JAR file --> next....

The jar file can be generated, however, when I use the command line to execute this jar

java -jar xxxx.jar

I got the error

no main manifest attribute, in test.jar

in the applet, I have no

public static void main(String args[])

while it should start with init().

And from what I've found so far, it seems like I have to add a manifest myself.

Please let me know how to fix this.

Upvotes: 2

Views: 1406

Answers (1)

MadProgrammer
MadProgrammer

Reputation: 347184

Applets are expected to run within an applet container, which is commonly supported by browsers (and the applet plugin). You can't run them from the command line, at least not without modifying the code to support a window based solution.

Take a look at:

Upvotes: 1

Related Questions