简体   繁体   中英

How can I make an executable JAR file in Eclipse of an Applet?

I have been working on a small applet/game over the past week and someone recommended that I make it into a JAR file. After looking into this more on Google I found a tutorial and started to follow it. However, I soon realized that I needed to choose a class file that had a main method in it. Applets do not use a main so I was wondering how I could still make it into a JAR file. Thanks!

Applets do not use a main so I was wondering how I could still make it into a JAR file.

Yes they sure can. In fact to have a good chance of being launched at all, applets need to be digitally signed, which can only be done with classes in a Jar.

..However, I soon realized that I needed to choose a class file that had a main method in it

That sounds like a problem with your IDE (you don't yet know how to use it, as opposed to having it use you).

BTW:

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