< prev index next >
tests/system/src/test/java/test/launchertest/MainLauncherTest.java
Print this page
rev 9568 : 8147427: refactor test launchers to support jake
Reviewed-by: kcr
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -130,18 +130,19 @@
if (headless) {
// Headless tests currently only run on Linux
assumeTrue(PlatformUtil.isLinux());
}
- final String classpath = System.getProperty("java.class.path");
- ProcessBuilder builder;
- if (testPldrName != null) {
- builder = new ProcessBuilder("java", "-cp", classpath,
- "-Djavafx.preloader=" + testPldrName, testAppName);
- } else {
- builder = new ProcessBuilder("java", "-cp", classpath, testAppName);
- }
+ final ArrayList<String> cmd =
+ test.util.Util.createApplicationLaunchCommand(
+ testAppName,
+ testPldrName,
+ null
+ );
+
+ final ProcessBuilder builder = new ProcessBuilder(cmd);
+
if (headless) {
// Set DISPLAY variable to empty to run in headless mode on Linux
builder.environment().put("DISPLAY", "");
}
builder.redirectError(ProcessBuilder.Redirect.INHERIT);
< prev index next >