< prev index next >

test/jdk/tools/jpackage/createinstaller/linux/base/JPackageCreateInstallerLicenseBase.java

Print this page




  57             throw new AssertionError("Error: " + folder.getAbsolutePath() + " exist");
  58         }
  59     }
  60 
  61     private static void init(String name, String ext) {
  62         TEST_NAME = name;
  63         EXT = ext;
  64         if (EXT.equals("rpm")) {
  65             OUTPUT = "output" + File.separator + TEST_NAME + "-1.0-1.x86_64." + EXT;
  66         } else {
  67             OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
  68         }
  69         CMD = new String [] {
  70         "create-installer",
  71         "--installer-type", EXT,
  72         "--input", "input",
  73         "--output", "output",
  74         "--name", TEST_NAME,
  75         "--main-jar", "hello.jar",
  76         "--main-class", "Hello",
  77         "--overwrite",
  78         "--files", "hello.jar",
  79         "--license-file", JPackagePath.getLicenseFilePath()};
  80     }
  81 
  82     public static void run(String name, String ext) throws Exception {
  83         init(name, ext);
  84 
  85         if (JPackageInstallerHelper.isVerifyInstall()) {
  86             verifyInstall();
  87         } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
  88             verifyUnInstall();
  89         } else {
  90             JPackageHelper.createHelloInstallerJar();
  91             testCreateInstaller();
  92         }
  93     }
  94 }


  57             throw new AssertionError("Error: " + folder.getAbsolutePath() + " exist");
  58         }
  59     }
  60 
  61     private static void init(String name, String ext) {
  62         TEST_NAME = name;
  63         EXT = ext;
  64         if (EXT.equals("rpm")) {
  65             OUTPUT = "output" + File.separator + TEST_NAME + "-1.0-1.x86_64." + EXT;
  66         } else {
  67             OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
  68         }
  69         CMD = new String [] {
  70         "create-installer",
  71         "--installer-type", EXT,
  72         "--input", "input",
  73         "--output", "output",
  74         "--name", TEST_NAME,
  75         "--main-jar", "hello.jar",
  76         "--main-class", "Hello",

  77         "--files", "hello.jar",
  78         "--license-file", JPackagePath.getLicenseFilePath()};
  79     }
  80 
  81     public static void run(String name, String ext) throws Exception {
  82         init(name, ext);
  83 
  84         if (JPackageInstallerHelper.isVerifyInstall()) {
  85             verifyInstall();
  86         } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
  87             verifyUnInstall();
  88         } else {
  89             JPackageHelper.createHelloInstallerJar();
  90             testCreateInstaller();
  91         }
  92     }
  93 }
< prev index next >