test/jdk/tools/jpackage/createappimage/JPackageCreateAppImageModuleMainClassErrorTest.java
branchJDK-8200758-branch
changeset 57445 405ddd80496e
parent 57414 6eda749d3117
equal deleted inserted replaced
57444:91e9d4691e5e 57445:405ddd80496e
    35  */
    35  */
    36 public class JPackageCreateAppImageModuleMainClassErrorTest {
    36 public class JPackageCreateAppImageModuleMainClassErrorTest {
    37     private static final String OUTPUT = "output";
    37     private static final String OUTPUT = "output";
    38     private static final String app = JPackagePath.getApp();
    38     private static final String app = JPackagePath.getApp();
    39     private static final String appOutput = JPackagePath.getAppOutputFile();
    39     private static final String appOutput = JPackagePath.getAppOutputFile();
    40     private static final String appWorkingDir = JPackagePath.getAppWorkingDir();
       
    41 
    40 
    42     private static final String [] CMD1 = {
    41     private static final String [] CMD1 = {
    43         "--output", OUTPUT,
    42         "--output", OUTPUT,
    44         "--name", "test",
    43         "--name", "test",
    45         "--module", "com.hello",
    44         "--module", "com.hello",
    51         "--module", "com.hello/com.hello.Hello",
    50         "--module", "com.hello/com.hello.Hello",
    52         "--module-path", "input"};
    51         "--module-path", "input"};
    53 
    52 
    54     private static void validate(String buildOutput) throws Exception {
    53     private static void validate(String buildOutput) throws Exception {
    55 
    54 
    56         File outfile = new File(appWorkingDir + File.separator + appOutput);
    55         File outfile = new File(appOutput);
    57         int retVal = JPackageHelper.execute(outfile, app);
    56         int retVal = JPackageHelper.execute(outfile, app);
    58         if (retVal != 0) {
    57         if (retVal != 0) {
    59             throw new AssertionError(
    58             throw new AssertionError(
    60                    "Test application exited with error: ");
    59                    "Test application exited with error: ");
    61         }
    60         }