< prev index next >

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

Print this page

        

*** 134,162 **** out.println("mime-type=application/" + TEST_EXT); out.println("description=jpackage test extention"); } } ! private static void init(String name, String ext) { TEST_NAME = name; EXT = ext; ! TEST_EXT = "jptest1"; OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT; CMD = new String[]{ "create-installer", "--installer-type", EXT, "--input", "input", "--output", "output", "--name", TEST_NAME, "--main-jar", "hello.jar", "--main-class", "Hello", "--files", "hello.jar", "--file-associations", "fa.properties"}; } ! public static void run(String name, String ext) throws Exception { ! init(name, ext); if (JPackageInstallerHelper.isVerifyInstall()) { verifyInstall(); } else if (JPackageInstallerHelper.isVerifyUnInstall()) { verifyUnInstall(); --- 134,176 ---- out.println("mime-type=application/" + TEST_EXT); out.println("description=jpackage test extention"); } } ! private static void init(String name, String ext, String installDir, String testExt) { TEST_NAME = name; EXT = ext; ! TEST_EXT = testExt; OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT; + if (installDir == null) { CMD = new String[]{ "create-installer", "--installer-type", EXT, "--input", "input", "--output", "output", "--name", TEST_NAME, "--main-jar", "hello.jar", "--main-class", "Hello", "--files", "hello.jar", "--file-associations", "fa.properties"}; + } else { + CMD = new String[]{ + "create-installer", + "--installer-type", EXT, + "--input", "input", + "--output", "output", + "--name", TEST_NAME, + "--main-jar", "hello.jar", + "--main-class", "Hello", + "--files", "hello.jar", + "--file-associations", "fa.properties", + "--install-dir", installDir}; + } } ! public static void run(String name, String ext, String installDir, String testExt) throws Exception { ! init(name, ext, installDir, testExt); if (JPackageInstallerHelper.isVerifyInstall()) { verifyInstall(); } else if (JPackageInstallerHelper.isVerifyUnInstall()) { verifyUnInstall();
< prev index next >