In the following examples, a command file (mycommandfile.jtb) is used to override the localHostNamevalue and the tests specified in the existing configuration.
The following three examples are provided:

If you attempt to run these examples, you must replace mytestsuite.ts, myworkdir.wd, and myconfig.jti with test suite, work directory, and .jti names that exist on your system. You must also modify the contents of the example command file for your configuration file and test suite. Win32 users must change / file separators to \ to run these examples.
The following lines are the contents of the example command file, mycommandfile.jtb:
#File sets localHostName and tests
set jck.env.runtime.net.localHostName mymachine;
tests api/javax_swing api/java_awt
The -set and -tests command forms are not used in the command file. Command files only use the "Single String Arguments Format."
See Setting Specific Configuration Values for additional examples of using the setcommand. See Specifying Tests to Run for additional examples of using the tests command.

See About the Command-Line Examples for a description of the use of > javatest in the following example. See Command-Line Overview for a description of the command line structure. See Formatting a Command for descriptions and examples of the following command formats.
In the following examples, a test suite (mytestsuite.ts), work directory (myworkdir.wd), and configuration file (myconfig.jti) are opened, and the command file (mycommandfile.jtb) is read and executed before running tests.
> javatest -open myconfig.jti @mycommandfile.jtb -runtests
> javatest "open myconfig.jti; @mycommandfile.jtb; runtests"
You can also change values after the command file is set:
> javatest -open myconfig.jti @mycommandfile.jtb -excludeList myexcludelist.jtx -runtests
> javatest "open myconfig.jti; @mycommandfile.jtb; excludeList myexcludelist.jtx; runtests"
Copyright © 2004, 2011, Oracle and/or its affiliates. All rights reserved.