< prev index next >

test/jdk/tools/jpackage/share/WithSpaceTest.java

Print this page




  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.io.File;
  25 
  26  /*
  27  * @test
  28  * @summary jpackage create image test
  29  * @library ../helpers
  30  * @build JPackageHelper
  31  * @build JPackagePath
  32  * @build Base
  33  * @modules jdk.jpackage
  34  * @run main/othervm -Xmx512m WithSpaceTest
  35  */
  36 public class WithSpaceTest {
  37     private static final String OUTPUT = "output";
  38 
  39     private static final String [] CMD1 = {

  40         "--input", "input dir",
  41         "--output", OUTPUT,
  42         "--name", "test",
  43         "--main-jar", "hello.jar",
  44         "--main-class", "Hello",
  45     };
  46 
  47     private static final String [] CMD2 = {

  48         "--input", "input dir2",
  49         "--output", OUTPUT,
  50         "--name", "test",
  51         "--main-jar", "sub dir/hello.jar",
  52         "--main-class", "Hello",
  53     };
  54 
  55     public static void main(String[] args) throws Exception {
  56 
  57         JPackageHelper.deleteOutputFolder(OUTPUT);
  58         JPackageHelper.createHelloImageJar("input dir");
  59         Base.testCreateAppImage(CMD1);
  60 
  61         JPackageHelper.deleteOutputFolder(OUTPUT);
  62         JPackageHelper.createHelloImageJar(
  63                 "input dir2" + File.separator + "sub dir");
  64 
  65         Base.testCreateAppImageToolProvider(CMD2);
  66         JPackageHelper.deleteOutputFolder(OUTPUT);
  67     }


  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.io.File;
  25 
  26  /*
  27  * @test
  28  * @summary jpackage create image test
  29  * @library ../helpers
  30  * @build JPackageHelper
  31  * @build JPackagePath
  32  * @build Base
  33  * @modules jdk.jpackage
  34  * @run main/othervm -Xmx512m WithSpaceTest
  35  */
  36 public class WithSpaceTest {
  37     private static final String OUTPUT = "output";
  38 
  39     private static final String [] CMD1 = {
  40         "--package-type", "app-image",
  41         "--input", "input dir",
  42         "--output", OUTPUT,
  43         "--name", "test",
  44         "--main-jar", "hello.jar",
  45         "--main-class", "Hello",
  46     };
  47 
  48     private static final String [] CMD2 = {
  49         "--package-type", "app-image",
  50         "--input", "input dir2",
  51         "--output", OUTPUT,
  52         "--name", "test",
  53         "--main-jar", "sub dir/hello.jar",
  54         "--main-class", "Hello",
  55     };
  56 
  57     public static void main(String[] args) throws Exception {
  58 
  59         JPackageHelper.deleteOutputFolder(OUTPUT);
  60         JPackageHelper.createHelloImageJar("input dir");
  61         Base.testCreateAppImage(CMD1);
  62 
  63         JPackageHelper.deleteOutputFolder(OUTPUT);
  64         JPackageHelper.createHelloImageJar(
  65                 "input dir2" + File.separator + "sub dir");
  66 
  67         Base.testCreateAppImageToolProvider(CMD2);
  68         JPackageHelper.deleteOutputFolder(OUTPUT);
  69     }
< prev index next >