Skip to main content



      Home
Home » Newcomers » Newcomers » Exception in thread "main"(Exception in thread "main" java.lang.UnsupportedClassVersionError:)
Exception in thread "main" [message #796517] Sat, 11 February 2012 23:42 Go to next message
Eclipse UserFriend
i have newly installed eclipse jee on fedora,
i am trying to run simple Hello World program and got following 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(SecureClassLoader.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.java:209)
at java.lang.ClassLoader.loadClass(ClassLoader.java:324)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:269)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:337)
Error: Could not find the main class.
Error: A JNI error has occurred, please check your installation and try again

what is wrong here?
please help me to solve this problem.
Re: Exception in thread "main" [message #796630 is a reply to message #796517] Sun, 12 February 2012 04:13 Go to previous message
Eclipse UserFriend
The JDK version that runs the program is older than the JDK version used to compile the code. You should make both the same version, or the JDK that runs the program is always the latest.
Previous Topic: error : Initializing Java Tooling
Next Topic:joptionpane
Goto Forum:
  


Current Time: Mon Jul 07 22:48:50 EDT 2025

Powered by FUDForum. Page generated in 0.13350 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top