Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Exception in thread "main"(Exception in thread "main" java.lang.UnsupportedClassVersionError:)
Exception in thread "main" [message #796517] Sun, 12 February 2012 04:42 Go to next message
ameet yadav is currently offline ameet yadavFriend
Messages: 10
Registered: February 2012
Location: india
Junior Member
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 09:13 Go to previous message
Nick Clevery is currently offline Nick CleveryFriend
Messages: 50
Registered: January 2012
Member
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: Sat Apr 27 00:32:18 GMT 2024

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

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

Back to the top