Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Java (http://www.programmingforums.org/forum17.html)
-   -   ...java.lang.UnsupportedClassVersionError..... (http://www.programmingforums.org/showthread.php?t=7424)

Krista Dec 6th, 2005 5:43 PM

...java.lang.UnsupportedClassVersionError.....
 
I get the following error when trying to run a server sided program. Does anyone know what it means?

Exception in thread "main" java.lang.UnsupportedClassVersionError: CommServer (Unsupported major.minor version 49.0)

at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass0(Unknown Source)
etc.....

I assume it has to do with the version of the .class files...but unsure. How do I go about fixing it if that is the problem...any suggestions?

Thanks

Dameon Dec 6th, 2005 6:01 PM

Perhaps the code was compiled using a later/earlier version of Java than is available on the server. Check what version the server is running. If it has the appropriate version available but is using the wrong one, you may need to specifically use the proper java executable.

titaniumdecoy Dec 6th, 2005 6:16 PM

Dameon may be right, but you can try adding
:

private static final long serialVersionUID = 1L;
to certain classes. My compiler is always bugging me with warnings that I should add this line, so try it and see if it does the trick (Apparently the number you supply, 1 in this case, is the version your code is at). Tell me if this works... I have no idea if it will.


All times are GMT -5. The time now is 4:23 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC