Reputation: 85
I get the error below when trying to run an executable jar file. The file only contains a main with one line "System.out.println("Woo!");" and runs fine in eclipse.
I'm not sure how to read these error messages.
(too new to post images correctly)
Upvotes: 0
Views: 608
Reputation: 41240
Your compiled class is in jre 1.5 and your system default jre is different(might be 1.6).
compile your code in same version of jre.
Upvotes: 1
Reputation: 24801
The error means that you have compiled the code with a higher version of java and trying to run it on a older version of jvm.
Since it says major.minor version 51.0
it means that your compiler is java6. So you should run your program on java6 or higher.
Upvotes: 3