I wrote a game (for the 4k competition) which extends a JFrame and contains a main method.
So far, I got a nice jar file (containing just one class file and the manifest) which can be started using: java -jar b.jar
Now, I would like to prepare that game for webstart (which as I understand works for application and applets, so I should be fine with my JFrame. Correct?).
First step: I sign my jar file without any problem. Observation: the jar file can no longer be executed because the jarsigner has deleted the Main-Class entry in my manifest. Is this normal?
Second step: I configured my web server correctly and uploaded a jnlp file.
Third step: I point my brwoser to that jnlp file and webstart tries to start my application.
I get the following error message:
java.lang.ClassCastException: B cannot be cast to java.applet.Applet
at com.sun.javaws.Launcher.executeApplet(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
What do I have to do differently to avoid this?
Thanks in advance,
Bruno