I am not able to run my Java program its giving following error:
Unsupported major.minor version 51.0
How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version?
Error comes when
a) You have compiled your java file in new version of Java and b) Trying to run it in lower version of Java
To solve this you should compile your Java file with the same version of JDK.
javac -target 1.5 HelloWorld.java