32 * @build JPackagePath |
32 * @build JPackagePath |
33 * @modules jdk.jpackage |
33 * @modules jdk.jpackage |
34 * @run main/othervm -Xmx512m JPackageCreateImageIconTest |
34 * @run main/othervm -Xmx512m JPackageCreateImageIconTest |
35 */ |
35 */ |
36 public class JPackageCreateImageIconTest { |
36 public class JPackageCreateImageIconTest { |
|
37 private static final String OUTPUT = "output"; |
37 private static final String app = JPackagePath.getApp(); |
38 private static final String app = JPackagePath.getApp(); |
38 private static final String appOutput = JPackagePath.getAppOutputFile(); |
39 private static final String appOutput = JPackagePath.getAppOutputFile(); |
39 private static final String appWorkingDir = JPackagePath.getAppWorkingDir(); |
40 private static final String appWorkingDir = JPackagePath.getAppWorkingDir(); |
40 |
41 |
41 private static final String[] CMD = { |
42 private static final String[] CMD = { |
42 "create-image", |
43 "create-image", |
43 "--input", "input", |
44 "--input", "input", |
44 "--name", "test", |
45 "--name", "test", |
45 "--main-jar", "hello.jar", |
46 "--main-jar", "hello.jar", |
46 "--main-class", "Hello", |
47 "--main-class", "Hello", |
47 "--overwrite", |
|
48 "--files", "hello.jar", |
48 "--files", "hello.jar", |
49 "--icon", getIconPath(), |
49 "--icon", getIconPath(), |
50 "--output", "output"}; |
50 "--output", OUTPUT}; |
51 |
51 |
52 private static void validateResult(String[] result) throws Exception { |
52 private static void validateResult(String[] result) throws Exception { |
53 if (result.length != 2) { |
53 if (result.length != 2) { |
54 throw new AssertionError( |
54 throw new AssertionError( |
55 "Unexpected number of lines: " + result.length); |
55 "Unexpected number of lines: " + result.length); |