Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / November 2005

Tip: Looking for answers? Try searching our database.

UnsupportedClassVersionError when using Java 5.0

Thread view: 
brightoceanlight@hotmail.com - 02 Nov 2005 15:28 GMT
I installed a new version of java, 5.0 and tried to run my application
with the new java version but get the following error :

java.lang.UnsupportedClassVersionError: MyServer (Unsupported
major.minor version 49.0)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
Exception in thread "main"

The program runs fine with 1.4.2, but fails with 5.0.

Could anyone suggest what might be wrong?
Roedy Green - 02 Nov 2005 15:53 GMT
>java.lang.UnsupportedClassVersionError

see
http://mindprod.com/jgloss/runerrormessages.html#UNSUPPORTEDCLASSVERSIONERROR
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

brightoceanlight@hotmail.com - 02 Nov 2005 16:32 GMT
A way to fix the problem :

In Eclipse ->Window->Preferences

Then under the tree : Java->Compiler

When you set Compiler compliance level : to 5.0

then under tree : Java->Installed JREs, need to add location of new jre
and then select the jre so it is checked.

This fixes the problem.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.