Webstart: Could not find main-class

I’m new to Java and Webstart in general. At this point I’m just testing out different approaches to build and distribute games or other applications using Java-engine. have prior experience in programming. Nowadays mostly commerical database-coding but plahplah… (who cares right? :wink: )

I started looking into this Webstart-technology and found out it was sort of usable (maybe?). I came close to getting it to work, but apparently something is still quite wrong.

I get webstart to launch and download my jar-file. But when launching the actual program, the error I get is:

Category: Launch File Error
Could not find main-class Game.class in

Ok, that is straightforward. The Webstart can’t find my class file (it’s the only one in this test-application).
But I can’t figure out why it’s not found.

My keely2d.jar looks like this:

/META-INF/KEELY.DSA
/META-INF/KEELY.SF
/META-INF/MANIFEST.TXT
/Game.class

and manifest.txt is:

Main-Class: Game.class
Manifest-Version: 1.0
Created-By: 1.4.2_04 (Sun Microsystems Inc.)

This is my humble (newbie) problem and thanks to anyone who has patience to ride for my rescue.

You don’t want that .class on the end of the class name specified for Main-Class.

Kev

You don’t want that .class on the end of the class name >specified for Main-Class.

Thx that helped.

Now I have the application window actually visible on the screen with right title and everything. So it seems that Webstart did start exec but now it says:

Category: Unexpected Error Game$1
java.lang.NoClassDefFoundError: Game$1

This might be real newbie-stuff here, but I just can’t be sure if my code needs adjusting or is there still sumthin wrong with the jar-file ? The code executes nicely in IDE-enviroment, though.

There’s something wrong with the jar file still. The $1 implies you have at least one annonymous class in “Game”. You’re not packaging the Game$1.class that gets generated when you compile.

Kev