When the harness is used to run tests, two possibly different versions of the JDK are used: the JDK version used to run the harness and the JDK version used to run the test(s) themselves.
To run the harness with one version of the JDK and the tests with another, use
the -othervm
option in conjunction with the -testjdk
option. The -testjdk
option will specify the version of the JDK
to run the tests. The environment variables JT_JAVA
or
JAVA_HOME
will specify the version of the JDK for the harness.