Hi,

well, the truth may be found somewhere in-between.
First of all, each java class has a version stamp,
older versions have lower numbers. The JVM is
backward compatible, so older classes also run
in a newer JVM. Version ranges are as follows:

Java 1.1 platform: 45.3-45.65535
Java 1.2 platform: 45.3-46.0
Java 1.3 platform: 45.3-47.0
Java 1.4 platform: 45.3-48.0

Java 5 class files are stamped with 49.0, and
the JVM is also backward compatible. So, a 1.3
class file will run in a 1.5 JVM, but not the
other way round. That's the reason for the
original problem. None of us would be able to
run Struts in an 1.4 or 1.5 JVM if it were
otherwise, as the binaries are 1.3 versions,
IIRC. Apart from that, Sun has been very
careful when it comes to JVM version compa-
tibility, much more than in other parts,
Serialization would be a prominent example
here. IIRC there were no changes to the
class format in 1.2 and 1.3, possibly in-
cluding 1.1 even. The changes made in 1.5
were mostly required by the extended type
system (Generics | 'type erasure'). Another
aspect of backward compatibility is the usage
of features in the Foundation Classes; this
lib has steadily grown over the years. If
a class files has dependencies on other
classes only available in a more recent
version, trying to do so will end up in
a ClassNotFound exception, but thats just
what is to be expected. An example for that
would be Tomcat 5.5: normally, it requires
Java 5, but you can install a compatibility
package that provides the missing features
and makes it run in a 1.4 setup.

HTH,
-- Chris.


starki78 schrieb:

Well I had this erroer
compiling sourcecode with
1.4 and some classes with 1.3
within one project


---------- Initial Header -----------

From      : "news" [EMAIL PROTECTED]
To          : user@struts.apache.org
Cc : Date : Wed, 01 Feb 2006 14:53:00 -0500
Subject : Re: Unsupported major.minor version 49.0


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to