I have these files board.class
and x4.class
(x4.class has main() method).
To jar these files, I wrote
jar cf x4.jar *.class
and got a x4.jar
file.
I copied this x4.jar file to my Desktop (on windows Vista) and double-clicked it. I am getting this error:
Failed to load Main-Class manifest attribute from
C:\Users\eSKay\Desktop\x4.jar
What should I do to make this file run as a jar executable (without installing any software)?
UPDATE: I used a manifest file to fix the problem. I have got the jar file I needeed and it is running fine if you do:
java -jar x4.jar
But, when I double click x4.jar nothing happens, I checked Task Manager and found that a javaw.exe is being started in the background, but it is not showing the output the original program was giving.
What can the problem be?