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(
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(
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
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: Sun Jun 13 17:20:30 GMT 2021

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

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

Back to the top