< prev index next >

test/jdk/tools/jlink/JLinkPluginsTest.java

Print this page




  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  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";




  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  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  * @requires (vm.compMode != "Xcomp" & os.maxMemory >= 2g)
  37  * @library ../lib
  38  * @modules java.base/jdk.internal.jimage
  39  *          jdk.jdeps/com.sun.tools.classfile
  40  *          jdk.jlink/jdk.tools.jlink.internal
  41  *          jdk.jlink/jdk.tools.jmod
  42  *          jdk.jlink/jdk.tools.jimage
  43  *          jdk.compiler
  44  * @build tests.*
  45  * @run main/othervm/timeout=300 -verbose:gc -Xmx1g JLinkPluginsTest
  46  */
  47 public class JLinkPluginsTest {
  48 
  49     private static String createProperties(String fileName, String content) throws IOException {
  50         Path p = Paths.get(fileName);
  51         Files.write(p, Collections.singletonList(content));
  52         return p.toAbsolutePath().toString();
  53     }
  54 
  55     public static void main(String[] args) throws Exception {
  56         Helper helper = Helper.newHelper();
  57         if (helper == null) {
  58             System.err.println("Test not run");
  59             return;
  60         }
  61         helper.generateDefaultModules();
  62         {
  63             // Skip debug
  64             String[] userOptions = {"--strip-debug"};
  65             String moduleName = "skipdebugcomposite";


< prev index next >