tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <>
Subject Re: [PATCH] allow tomcat5 to compile/run with JDK1.3
Date Tue, 04 Feb 2003 02:21:12 GMT
Here is an attempt at a JdkCompat implementation. There are 2 classes, 
JdkCompat which is the base support class and Jdk14Compat which extends 

The patch is in JdkCompat.txt for WebappClassloader and build.xml. I 
manually edited the patch file to eliminate all the extra edits my text 
editor makes with respect to whitespace changes.

Everyone will call JdkCompat.getJdkCompat() to get a JdkCompat instance. 
When JdkCompat is statically initialized, it determines which 
implementation to load. Currently, it performs a check on 
System.getProperty("java.version"). If the property starts with 1.4 then 
the Jdk14Compat class is loaded. Otherwise, the default JdkCompat will 
be loaded.

So, this has the side effect that when jdk1.5(and beyond) comes out - 
this will load the wrong version of the class. Should I ignore that 
issue for now or create a better comparison?


Costin Manolache wrote:
> Tim Funk wrote:
>>To get functionality like jdkCompat (and looking at tomcat3), it looks
>>like something similar to the following would need added to the existing
>>   <exclude name="org/apache/catalina/util/compat/"
>>            unless="jdk.1.4.present"/>
>>Where would jdkCompat live with respect to package name? Does it belong
>>in catalina? (org.apache.catalina.util.compat.ClassXXX)
> I would place it in j-t-c/util, even in o.a.tomcat.util.compat ( but with a
> different name than jkd11compat class in 3.3 ).
> This kind of code is very common.

View raw message