test/jdk/tools/jpackage/createappimage/JPackageCreateAppImageMainClassAttributeTest.java
branchJDK-8200758-branch
changeset 57445 405ddd80496e
parent 57414 6eda749d3117
equal deleted inserted replaced
57444:91e9d4691e5e 57445:405ddd80496e
    35  */
    35  */
    36 public class JPackageCreateAppImageMainClassAttributeTest {
    36 public class JPackageCreateAppImageMainClassAttributeTest {
    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[] CMD = {
    41     private static final String[] CMD = {
    43         "--input", "input",
    42         "--input", "input",
    44         "--output", OUTPUT,
    43         "--output", OUTPUT,
    45         "--name", "test",
    44         "--name", "test",
    65         if (retVal != 0) {
    64         if (retVal != 0) {
    66             throw new AssertionError(
    65             throw new AssertionError(
    67                    "Test application exited with error: " + retVal);
    66                    "Test application exited with error: " + retVal);
    68         }
    67         }
    69 
    68 
    70         File outfile = new File(appWorkingDir + File.separator + appOutput);
    69         File outfile = new File(appOutput);
    71         if (!outfile.exists()) {
    70         if (!outfile.exists()) {
    72             throw new AssertionError(appOutput + " was not created");
    71             throw new AssertionError(appOutput + " was not created");
    73         }
    72         }
    74 
    73 
    75         String output = Files.readString(outfile.toPath());
    74         String output = Files.readString(outfile.toPath());