Reputation: 11
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!
Upvotes: 0
Views: 954
Reputation: 168795
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:
main(String[])
method (jar it and sign it) and launch it from a link on a web page using Java Web Start.Upvotes: 1