< prev index next >

test/jdk/tools/jpackage/createinstaller/macosx/base/JPackageCreateInstallerFileAssociationsBase.java

Print this page




 114                 new FileWriter("fa.properties")))) {
 115             out.println("extension=" + TEST_EXT);
 116             out.println("mime-type=application/" + TEST_EXT);
 117             out.println("description=jpackage test extention");
 118         }
 119     }
 120 
 121     private static void init(String name, String ext) {
 122         TEST_NAME = name;
 123         EXT = ext;
 124         TEST_EXT = "jptest1";
 125         OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
 126         CMD = new String[]{
 127             "create-installer",
 128             "--installer-type", EXT,
 129             "--input", "input",
 130             "--output", "output",
 131             "--name", TEST_NAME,
 132             "--main-jar", "hello.jar",
 133             "--main-class", "Hello",
 134             "--overwrite",
 135             "--files", "hello.jar",
 136             "--file-associations", "fa.properties"};
 137     }
 138 
 139     public static void run(String name, String ext) throws Exception {
 140         init(name, ext);
 141 
 142         if (JPackageInstallerHelper.isVerifyInstall()) {
 143             verifyInstall();
 144         } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
 145             verifyUnInstall();
 146         } else {
 147             JPackageHelper.createHelloInstallerJar();
 148             createFileAssociationsProperties();
 149             testCreateInstaller();
 150         }
 151     }
 152 }


 114                 new FileWriter("fa.properties")))) {
 115             out.println("extension=" + TEST_EXT);
 116             out.println("mime-type=application/" + TEST_EXT);
 117             out.println("description=jpackage test extention");
 118         }
 119     }
 120 
 121     private static void init(String name, String ext) {
 122         TEST_NAME = name;
 123         EXT = ext;
 124         TEST_EXT = "jptest1";
 125         OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
 126         CMD = new String[]{
 127             "create-installer",
 128             "--installer-type", EXT,
 129             "--input", "input",
 130             "--output", "output",
 131             "--name", TEST_NAME,
 132             "--main-jar", "hello.jar",
 133             "--main-class", "Hello",

 134             "--files", "hello.jar",
 135             "--file-associations", "fa.properties"};
 136     }
 137 
 138     public static void run(String name, String ext) throws Exception {
 139         init(name, ext);
 140 
 141         if (JPackageInstallerHelper.isVerifyInstall()) {
 142             verifyInstall();
 143         } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
 144             verifyUnInstall();
 145         } else {
 146             JPackageHelper.createHelloInstallerJar();
 147             createFileAssociationsProperties();
 148             testCreateInstaller();
 149         }
 150     }
 151 }
< prev index next >