< prev index next >

test/jdk/jigsaw/tools/jlink/JLinkPluginsTest.java

Print this page




  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 jdk.tools.jlink.internal.ImagePluginConfiguration;
  31 import jdk.tools.jlink.plugins.CmdPluginProvider;
  32 import tests.Helper;
  33 
  34 /*
  35  * @test
  36  * @summary Test image creation
  37  * @author Jean-Francois Denise
  38  * @library ../lib
  39  * @modules java.base/jdk.internal.jimage
  40  *          jdk.jdeps/com.sun.tools.classfile
  41  *          jdk.jlink/jdk.tools.jlink
  42  *          jdk.jlink/jdk.tools.jlink.internal
  43  *          jdk.jlink/jdk.tools.jmod
  44  *          jdk.jlink/jdk.tools.jimage

  45  * @build tests.*
  46  * @run main/othervm -verbose:gc -Xmx1g JLinkPluginsTest
  47  */
  48 public class JLinkPluginsTest {
  49 
  50     private static String createProperties(String fileName, String content) throws IOException {
  51         Path p = Paths.get(fileName);
  52         Files.write(p, Collections.singletonList(content));
  53         return p.toAbsolutePath().toString();
  54     }
  55 
  56     public static void main(String[] args) throws Exception {
  57         Helper helper = Helper.newHelper();
  58         if (helper == null) {
  59             System.err.println("Test not run");
  60             return;
  61         }
  62         helper.generateDefaultModules();
  63         {
  64             // zip




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


< prev index next >