It is necessary for the reference implementation TCK XJC and SCHEMAGEN scripts to specify variables: JAVA_HOME, JAXB_HOME and JAXB_ENDORSED.
For example, on Solaris:
JAVA_HOME=/jdk1.8.0/solaris-sparc JAXB_HOME=/jaxb-2.3 JAXB_ENDORSED=/path/to/jaxb-api.jar
JAVA_HOME=d:\jdk1.8.0\windows-i586 JAXB_HOME=d:\jaxb-2.3 JAXB_ENDORSED=d:\path\to\jaxb-api.jar
Important!
Options to the scripts for JDK9 can be made available by setting the following variables:
TCK_JAXB_OPTIONS, TCK_JAXB_OTHER_OPTIONS
For Oracle RI, these variables can take the following values:
TCK_JAXB_OPTIONS=--add-modules=jdk.xml.bind --upgrade-module-path=<JAXB-RI>\lib\jaxb-api.jar
TCK_JAXB_OTHER_OPTIONS=--add-modules=jdk.xml.bind --upgrade-module-path=<JAXB-RI>\lib\jaxb-api.jar
JavaTest cannot inherit environment variables from your operating system environment. If you find that your tests run correctly outside of JavaTest, but do not run correctly using JavaTest, it may be because a value is set in your operating system environment that is not available to the test. If you check your operating system environment and determine that this is the case, set the missing values here.