本文整理汇总了Java中jdk.testlibrary.Utils.addTestJavaOpts方法的典型用法代码示例。如果您正苦于以下问题:Java Utils.addTestJavaOpts方法的具体用法?Java Utils.addTestJavaOpts怎么用?Java Utils.addTestJavaOpts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jdk.testlibrary.Utils
的用法示例。
在下文中一共展示了Utils.addTestJavaOpts方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startApplication
import jdk.testlibrary.Utils; //导入方法依赖的package包/类
/**
* The Application process must be run concurrently with our tests since
* the tests will attach to the Application.
* We will run the Application process in a separate thread.
*
* The Application must be started with flag "-Xshare:off" for the Retransform
* test in TestBasics to pass on all platforms.
*
* The Application will write its pid and shutdownPort in the given outFile.
*/
public static ProcessThread startApplication(String... additionalOpts) throws Throwable {
String classpath = System.getProperty("test.class.path", ".");
String[] myArgs = concat(additionalOpts, new String [] {
"-XX:+UsePerfData", "-XX:+EnableDynamicAgentLoading",
"-Dattach.test=true", "-classpath", classpath, "Application"
});
String[] args = Utils.addTestJavaOpts(myArgs);
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
ProcessThread pt = new ProcessThread("runApplication", (line) -> line.equals(Application.READY_MSG), pb);
pt.start();
return pt;
}
示例2: startApplication
import jdk.testlibrary.Utils; //导入方法依赖的package包/类
/**
* The Application process must be run concurrently with our tests since
* the tests will attach to the Application.
* We will run the Application process in a separate thread.
*
* The Application must be started with flag "-Xshare:off" for the Retransform
* test in TestBasics to pass on all platforms.
*
* The Application will write its pid and shutdownPort in the given outFile.
*/
public static ProcessThread startApplication(String outFile, String... additionalOpts) throws Throwable {
String classpath = System.getProperty("test.class.path", ".");
String[] myArgs = concat(additionalOpts, new String [] { "-Dattach.test=true", "-classpath", classpath, "Application", outFile });
String[] args = Utils.addTestJavaOpts(myArgs);
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
ProcessThread pt = new ProcessThread("runApplication", pb);
pt.start();
return pt;
}
示例3: startApplication
import jdk.testlibrary.Utils; //导入方法依赖的package包/类
/**
* The Application process must be run concurrently with our tests since
* the tests will attach to the Application.
* We will run the Application process in a separate thread.
*
* The Application must be started with flag "-Xshare:off" for the Retransform
* test in TestBasics to pass on all platforms.
*
* The Application will write its pid and shutdownPort in the given outFile.
*/
public static ProcessThread startApplication(String... additionalOpts) throws Throwable {
String classpath = System.getProperty("test.class.path", ".");
String[] myArgs = concat(additionalOpts, new String [] { "-XX:+UsePerfData", "-Dattach.test=true", "-classpath", classpath, "Application" });
String[] args = Utils.addTestJavaOpts(myArgs);
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
ProcessThread pt = new ProcessThread("runApplication", (line) -> line.equals(Application.READY_MSG), pb);
pt.start();
return pt;
}
示例4: startApplication
import jdk.testlibrary.Utils; //导入方法依赖的package包/类
/**
* The Application process must be run concurrently with our tests since
* the tests will attach to the Application.
* We will run the Application process in a separate thread.
*
* The Application must be started with flag "-Xshare:off" for the Retransform
* test in TestBasics to pass on all platforms.
*
* The Application will write its pid and shutdownPort in the given outFile.
*/
public static ProcessThread startApplication(String outFile) throws Throwable {
String classpath = System.getProperty("test.class.path", ".");
String[] args = Utils.addTestJavaOpts(
"-Dattach.test=true", "-classpath", classpath, "Application", outFile);
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
ProcessThread pt = new ProcessThread("runApplication", pb);
pt.start();
return pt;
}