equal
deleted
inserted
replaced
36 import java.util.List; |
36 import java.util.List; |
37 import java.util.stream.Collectors; |
37 import java.util.stream.Collectors; |
38 import java.util.stream.Stream; |
38 import java.util.stream.Stream; |
39 |
39 |
40 import java.util.spi.ToolProvider; |
40 import java.util.spi.ToolProvider; |
41 import jdk.incubator.jpackage.ToolProviderFactory; |
|
42 |
41 |
43 public class JPackageHelper { |
42 public class JPackageHelper { |
44 |
43 |
45 private static final boolean VERBOSE = false; |
44 private static final boolean VERBOSE = false; |
46 private static final String OS = System.getProperty("os.name").toLowerCase(); |
45 private static final String OS = System.getProperty("os.name").toLowerCase(); |
112 } |
111 } |
113 TEST_SRC_ROOT = root.toString(); |
112 TEST_SRC_ROOT = root.toString(); |
114 } |
113 } |
115 |
114 |
116 static final ToolProvider JPACKAGE_TOOL = |
115 static final ToolProvider JPACKAGE_TOOL = |
117 ToolProviderFactory.findFirst("jpackage").orElseThrow( |
116 ToolProvider.findFirst("jpackage").orElseThrow( |
118 () -> new RuntimeException("jpackage tool not found")); |
117 () -> new RuntimeException("jpackage tool not found")); |
119 |
118 |
120 public static int execute(File out, String... command) throws Exception { |
119 public static int execute(File out, String... command) throws Exception { |
121 if (VERBOSE) { |
120 if (VERBOSE) { |
122 System.out.print("Execute command: "); |
121 System.out.print("Execute command: "); |