This is a comment from build.xml, maybe it will help:
<target name="junit-init" depends="junit-init-nocp">
<!-- Set up the default classpath to use with JUnit tests. junit tasks
should include the following entries in the order specified in
their nested classpath structure:
<fileset dir="${derby.junit.test.jars}" includes="*.jar"/>
<pathelement path="${derby.junit.classpath}"/>
The preferences:
1) User-specified derby.junit.classpath
2) Jars (insane preferred over sane)
3) classes-directory
Note also that the user's CLASSPATH environment variable is appended
to the JUnit classpath, but in most cases Derby classes here will be
shadowed by one of the above entries. It is recommended to not have
any Derby classes in the CLASSPATH environment variable.
-->
In my case, I am able to run "ant junit-all" without any setting in my
CLASSPATH after building with "ant all buildjars".
Dag