I am new user on fedora (release: 8 codename: werewolf kernel linux 2.6.23.1-42.fc8 GNOME 2.20.1),
while doing java program got error,
Error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: HelloWorld : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java :638)
at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:143)
at java.net.URLClassLoader.defineClass(URLClassLoader .java:281)
at java.net.URLClassLoader.access$000(URLClassLoader. java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java: 216)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:209)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 24)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 69)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:337)
Error: Could not find the main class.
Error: A JNI error has occurred, please check your installation and try again
program:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}
this error is there in other programs also,
please tell me what is wrong.