tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "pero" <megap...@gmx.de>
Subject RE: [PATCH] allow tomcat5 to compile/run with JDK1.3
Date Wed, 05 Feb 2003 03:19:44 GMT
> 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?

  I don't know whether System.getProperty ("java.version") always returns
the correct version, especially for non SUN-implementations. Perhaps it is
better (for now) to perform the check on the actual need, meaning trying
to invoke "file.toURI().toURL()" via Reflection and see if it works. This
will give the safety that for JDK 1.5 the correct (i.e. 1.4) compat will be
used. But this mechanism will get complicated if other methods with other
dependencies are added. :( 

Really only my $0.02,

Peter


---------------------------------------------------------------------
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