Hi Jean,

I find that I have to wire in  the following:

o All of the jar files in trunk/tools/java
o The compiled Derby class tree
o The DB2JCC jar and license file

I'm attaching a script which I use to setup the classpath.

Regards,
-Rick

Jean Morissette wrote:

Hi devs,
  I try to figure how the test harness works, however I don't
understand how the classpath is set.  It seems to be set from a system
property named "classpath".  However, running the class RunTest in
debug mode, the property "classpath" is null!  So the execution fail.

Also, if I change the property name for "java.class.path" instead of
"classpath", the test classpath is set to that of the running JVM. However, this also don't work because there are some whitespaces (by
exemple, C:\Program Files\...) in the classpath that the
jvm.getCommandLine() method doesn't expect (because this method
tokenizes with whitespace).

So, my question is how to specify the classpath to run a test?  Am I
missing something?
I use version 10.1.2.0

Thanks for your help,
-Jean

#! /usr/bin/bash
#
# Setup derby classpath

HOME_DIR=c:/cygwin/home/rh161140
CURRENT_BRANCH=$HOME_DIR/derby/$SANDBOX/$BRANCH
DERBY_JAR_DIR=$CURRENT_BRANCH/tools/java
DB2JCC_DIR=$HOME_DIR/sw/db2jcc/lib
CLASSPATH=$CURRENT_BRANCH/classes

for jarFile in $DERBY_JAR_DIR/*
do
    export CLASSPATH=$CLASSPATH\;$jarFile
done

export 
CLASSPATH=$CLASSPATH\;$DB2JCC_DIR/db2jcc.jar\;$DB2JCC_DIR/db2jcc_license_c.jar

Reply via email to