简体   繁体   中英

If I'm using applet how can I create a .jar file using Eclipse?

I am currently working on creating an artificial world and I have followed the following website http://www.ethics.ubc.ca/eame/eameweb/Simulators/JavaProject/TofC.html

He used an applet to create it and have 9 classes in total.

I have done edited the coding and it works perfectly fine in Eclipse but when I try to export a .jar file its just not working.

I have tried to export it as a "Jar File" and generate a Bug.jar and I extract the file and add, in the MANIFEST.MF file:

Main-Class: Bugs.World 

Then when I double click the Bug.jar file, nothing happen.

When I try to export with "Runnable Jar File", I can't find my program under the Launch Configuration.

Can anyone help me on this please? Thanks!

Then when I double click the Bug.jar file, nothing happen.

That won't work for an applet. For more info., run it from the CLI as:

java -jar Bug.jar 

To launch an applet, it needs to be embedded in HTML or launched using Java Web Start (embedded or free floating) using a JNLP.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM