db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Van Couvering <David.Vancouver...@Sun.COM>
Subject Re: Using JDK 1.4 features in tests
Date Fri, 22 Jul 2005 21:30:21 GMT
Thanks, Andrew.  I was trying to add some functionality to look for a 
pattern in a string, using java.util.regex.  In general this test is 
intended to be run in JDK 1.3, and potentially (I'm not sure) in J2ME.

So, am I not allowed to use 1.4 features in these "generic" tests that 
are intended for use across JVMs?  Sounds like it... Sigh...


Andrew McIntyre wrote:

> On Jul 22, 2005, at 11:04 AM, David Van Couvering wrote:
>> Hi.  In some test code, I am getting errors saying the package 
>> java.regex is not found.  I suspect the tests are being built with JDK 
>> 1.3.  Is this a requirement -- can the tests not use any JDK 1.4 
>> functionality?  Or is this just a configuration change I need to make?
> For each test package, there's a compilation target which compiles the 
> classes which use JDK 1.4 functionality. You'll need to make sure that 
> your test is included in the target that compiles using 
> java14compile.classpath and excluded from the target which compiles 
> using compile.classpath. For example, in tests/lang, the target which 
> compiles using java14compile.classpath is "compilet2".
> But, is this test for functionality that is exposed to JDK 1.3 or 
> JSR169? If so, I would think that your test should run in a 1.3 VM or 
> J2ME environment.
> If the test is for functionality that is only exposed to 1.4 or higher 
> VMs, then you should probably add the test to the jdk14 suite to prevent 
> it from running in pre-1.4 level environments.
> andrew

View raw message