class file has wrong version 49.0, should be 48.0

Hi All,

I am unable to run Dynamic web project using Jsp and Eclipse IDE with jre1.6 version.I am getting above specipied error.Is there any compatibility problem with Eclipse and jre versions.Please tell me cpmpatibilities on these two.Please help on this.

Thanks in advance.

Message was edited by:

LavanyaKampally

[347 byte] By [LavanyaKampallya] at [2007-11-27 9:09:26]
# 1
You have a version inconsistency between the compiled code in question and the version of the JDK it's trying to run under.The versions have to match how you get there is up to you. (You can either recompile the offending class or change the running envirionment.)PS.
puckstopper31a at 2007-7-12 21:49:26 > top of Java-index,Java Essentials,Java Programming...
# 2

You're still running an older version of the JVM. I think 48 is 1.4 (though it might be 1.5). You say "with jre1.6", but you must still have an old 1.4 or 1.5 around that's being picked up, but class files that were compiled with a newer version.

If you're doing this on the command line, make sure your PATH variable has the 1.6 jre before any older ones.

If you're running from within eclipse, there should be a setting somewhere to tell it which VM to use. I don't know where, offhand, but it should be in eclipse's docs.

jverda at 2007-7-12 21:49:26 > top of Java-index,Java Essentials,Java Programming...
# 3
I had this error a few times during an ejb project and what i did was deleting the *.class files and recompile the sourcecode. Should work.
deAppela at 2007-7-12 21:49:26 > top of Java-index,Java Essentials,Java Programming...
# 4

> I had this error a few times during an ejb project

> and what i did was deleting the *.class files and

> recompile the sourcecode. Should work.

Wrong. His compiler is quite obviously new. He THINKS his runtime is new as well but his operating system is picking up an old runtime instead.

The cause for this is quite well known, and this question has been answered numerous times (on average at least once a week) already over the years, yet people still find it necessary to ask it themselves instead of just looking up the answer.

jwentinga at 2007-7-12 21:49:26 > top of Java-index,Java Essentials,Java Programming...
# 5

Ya I studied and tried everything that the people mentioned previously.

Anyway i got the answer.Just i overwrite the tools.jar file which is in the tomcat5.0/common/lib folder with jre/..../tools.jar file, Now it is working ok thank u to all

Message was edited by:

LavanyaKampally

LavanyaKampallya at 2007-7-12 21:49:26 > top of Java-index,Java Essentials,Java Programming...