tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: [PATCH] allow tomcat5 to compile/run with JDK1.3
Date Mon, 03 Feb 2003 13:07:13 GMT
After looking at the older revisions, I agree my patch was stupendously 
horrible :(

The patch now uses reflection to keep the current code equivalent for 
jdk14 and use the old way in case of a jdk1.3 jvm.

That being said - I would assume that the RMI issue your patch addressed 
would still be an issue in JDK1.3. Can you give me some insight on what 
it was? If possible I can attempt to make the appropriate fix.

I think commons-dbcp project do some wacky magic on java src files ( 
poor man's equivalent of c directives for code include/exclude). Is that 
an alternative to move towards for situations like this? Or is having 
one and only one binary the a better goal? (So users don't need to 
choose a 1.3 and 1.4 binary)

-Tim


Remy Maucherat wrote:
> Tim Funk wrote:
> 
>> Tomcat5 does not compile with JDK1.3. It does with JDK1.4.
>>
>> There is only one line of code that prevents it from compiling with 
>> JDK1.3.
>> org.apache.catalina.loader.WebappClassLoader depends on File.toURI() 
>> which does not exist on jdk1.3.
>>
>> I got around this by the performing the following:
>> OLD CODE:
>>   return realFile.toURI().toURL();
>> NEW CODE
>>   return new URL("file:" + realFile.toURL().getPath());
>>
>> My patch also has some spurious stuff because my text editor 
>> automatically strips all trailing whitespace from lines and converts 
>> tabs to spaces. The important stuff is the last 9 lines of the patch 
>> file.
> 
> 
> The patch is a bad idea. The change was made to fix RMI related problems.
> 
> What should be done is invoke the appropriate methods through 
> reflection, catching any error (and defaulting to the old code if it 
> fails).
> 
> Remy
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 
> 

Mime
View raw message