Problem with Jar file

Hi I have created a jar file to launch my new cool game (my first). When i doubleclik at the file, my game starts and runs perfect. But as soon as I press player1 fire (space) or player2 fire (ctrl), the program shuts down. I don’t have these problems when I start the game from cmd. What is wrong?
Thanks

Double clicking just runs a command. On my machine it does:


"C:\Program Files\Java\j2re1.4.2_06\bin\javaw.exe" -jar "%1" %*

This obviously is running a specific JRE. If you’ve got more then one installed, you could be using a different one without realising it?

Run it with:

java -jar foo.jar

Then you should be able to see what went wrong. (If you put it into a bat or cmd file add a “pause” below that line.)