24 import java.io.IOException;
25 import java.nio.file.Files;
26 import java.nio.file.Path;
27 import java.nio.file.Paths;
28 import java.util.Collections;
29
30 import tests.Helper;
31
32 /*
33 * @test
34 * @summary Test image creation
35 * @author Jean-Francois Denise
36 * @library ../lib
37 * @modules java.base/jdk.internal.jimage
38 * jdk.jdeps/com.sun.tools.classfile
39 * jdk.jlink/jdk.tools.jlink.internal
40 * jdk.jlink/jdk.tools.jmod
41 * jdk.jlink/jdk.tools.jimage
42 * jdk.compiler
43 * @build tests.*
44 * @run main/othervm -verbose:gc -Xmx1g JLinkPluginsTest
45 */
46 public class JLinkPluginsTest {
47
48 private static String createProperties(String fileName, String content) throws IOException {
49 Path p = Paths.get(fileName);
50 Files.write(p, Collections.singletonList(content));
51 return p.toAbsolutePath().toString();
52 }
53
54 public static void main(String[] args) throws Exception {
55 Helper helper = Helper.newHelper();
56 if (helper == null) {
57 System.err.println("Test not run");
58 return;
59 }
60 helper.generateDefaultModules();
61 {
62 // Skip debug
63 String[] userOptions = {"--strip-debug"};
64 String moduleName = "skipdebugcomposite";
|
24 import java.io.IOException;
25 import java.nio.file.Files;
26 import java.nio.file.Path;
27 import java.nio.file.Paths;
28 import java.util.Collections;
29
30 import tests.Helper;
31
32 /*
33 * @test
34 * @summary Test image creation
35 * @author Jean-Francois Denise
36 * @library ../lib
37 * @modules java.base/jdk.internal.jimage
38 * jdk.jdeps/com.sun.tools.classfile
39 * jdk.jlink/jdk.tools.jlink.internal
40 * jdk.jlink/jdk.tools.jmod
41 * jdk.jlink/jdk.tools.jimage
42 * jdk.compiler
43 * @build tests.*
44 * @run main/othervm -verbose:gc JLinkPluginsTest
45 */
46 public class JLinkPluginsTest {
47
48 private static String createProperties(String fileName, String content) throws IOException {
49 Path p = Paths.get(fileName);
50 Files.write(p, Collections.singletonList(content));
51 return p.toAbsolutePath().toString();
52 }
53
54 public static void main(String[] args) throws Exception {
55 Helper helper = Helper.newHelper();
56 if (helper == null) {
57 System.err.println("Test not run");
58 return;
59 }
60 helper.generateDefaultModules();
61 {
62 // Skip debug
63 String[] userOptions = {"--strip-debug"};
64 String moduleName = "skipdebugcomposite";
|