com.sun.javatest.lib
Class ExecStdTestSameJVMCmd

java.lang.Object
  extended by com.sun.javatest.Command
      extended by com.sun.javatest.lib.ExecStdTestSameJVMCmd

public class ExecStdTestSameJVMCmd
extends Command

ExecStdTestSameJVMCmd executes a standard test (one that implements the Test interface) in the same Java Virtual Machine as the caller. It can use either a private class loader or the system class loader. A private class loader will be created if the -loadDir option is given; otherwise the system class loader will be used. A private class loader minimises the interference between tests, but you may be restricted from using private class loaders if you are running the harness inside a web browser.

If the the -repeat option is provided, then the test will be run multiple times in the same JVM. Status.error() will be returned (and the remainder of the iterations will not be performed) if any repetition of the test returns an error, or if the status return type changes between iterations. The returned status after each iteration will be included in the log. If this option is not given, the test will be run once.

See Also:
ExecStdTestOtherJVMCmd

Constructor Summary
ExecStdTestSameJVMCmd()
           
 
Method Summary
 Status run(java.lang.String[] args, java.io.PrintWriter log, java.io.PrintWriter ref)
          The method that that does the work of the command.
 
Methods inherited from class com.sun.javatest.Command
getClassLoader, setClassLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecStdTestSameJVMCmd

public ExecStdTestSameJVMCmd()
Method Detail

run

public Status run(java.lang.String[] args,
                  java.io.PrintWriter log,
                  java.io.PrintWriter ref)
The method that that does the work of the command.

Specified by:
run in class Command
Parameters:
args - [-loadDir dir] [-saveProps] executeClass executeArgs
log - A stream to which to report messages and errors
ref - A stream to which to write reference output
Returns:
The result of the command


Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.