I have just began learning Java programming, I have created a simple game using Net-beans IDE. I wanted to show it to my friends, so I built it into a .jar. As per the readme that Net beans generates, I attempted to run the .jar with
java -jar "gameTest.jar"
However I get the error: "Failed to load Main-Class manifest attribute".
And now not only will this jar not run, others that I have previously run without issue are failing in the same way. Fir example I have Minecraft, running off the .jar distribution so I can give it more memory trough a .bat file for HD textures. But it also generates this same error when I open it. And I know that there is nothing wrong with it.
All the things I have found online about this error say that there is a problem with the manifest, however this can not be true for all the .jar files on my computer, especially those that I have already used multiple times in the past without issue. There must be something in the OS or java instalation that is wrong.
Win7 x64
Java 6 x32
JRE 6
解决方案
It seems that, for whatever reason, re-installing both JRE and JDK (in that order) has fixed the problem.
No idea of the reason.