Great, thanks for all the great tips!
David
Knut Anders Hatlen wrote:
Kristian Waagan <[EMAIL PROTECTED]> writes:
Andrew McIntyre wrote:
On 5/8/06, David Van Couvering <[EMAIL PROTECTED]> wrote:
Hi, all. I am switching over to Solaris x86, and although I can run
jdbc40 fine on XP, on Solaris I get the same behavior I get on Linux: it
happily runs along and skips all tests.
I explicitly run the jdk 1.6 version of the java interpreter:
/usr/jdk/jdk1.6.0/bin/java
org.apache.derbyTesting.functionTests.harness.RunSuite jdbc40
My JAVA_HOME also points to jdk 1.6
How do I stop RunSuite from pointing to /usr/j2se/jre?
RunTest spawns new processes with Runtime.exec(), which inherits your
current environment (which presumably has /usr/j2se/jre in the PATH).
The test harness just calls "java ..." which ends up being the one in
/usr/j2se/jre in the forked process.
So, put it in your path. If you really want to call it explicitly and
not put it in your path for some reason, then you need to also pass
the full path in as the javaCmd property:
java -DjavaCmd=/usr/jdk/jdk1.6.0/bin/java
org.apache.derby.functionTests...
FYI, this also works (in bash):
PATH=/usr/jdk/jdk1.6.0/bin/:${PATH} java
org.apache.derbyTesting.functionTests.harness.RunSuite jdbc40
I use this in my test scripts, mostly because I set several other
enviroment variables as well.
You can also create a script called java and put it first in your
PATH:
----
#!/bin/sh
exec $JAVA_HOME/bin/java "$@"
----
Then you always get the JVM pointed to by JAVA_HOME. You could create
a similar script for javac. I use this so that I can easily switch
between different JVMs.