< prev index next >

test/jdk/java/util/jar/JarFile/mrjar/MultiReleaseJarHttpProperties.java

Print this page


   1 /*
   2  * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  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 /*
  25  * @test
  26  * @bug 8132734
  27  * @summary Test the System properties for JarFile that support multi-release jar files
  28  * @library /lib/testlibrary/java/util/jar
  29  * @modules jdk.jartool
  30  *          jdk.compiler
  31  *          jdk.httpserver
  32  * @build Compiler JarBuilder CreateMultiReleaseTestJars SimpleHttpServer
  33  * @run testng MultiReleaseJarHttpProperties
  34  * @run testng/othervm -Djdk.util.jar.version=0 MultiReleaseJarHttpProperties
  35  * @run testng/othervm -Djdk.util.jar.version=8 MultiReleaseJarHttpProperties
  36  * @run testng/othervm -Djdk.util.jar.version=9 MultiReleaseJarHttpProperties
  37  * @run testng/othervm -Djdk.util.jar.version=10 MultiReleaseJarHttpProperties
  38  * @run testng/othervm -Djdk.util.jar.version=100 MultiReleaseJarHttpProperties
  39  * @run testng/othervm -Djdk.util.jar.version=8 -Djdk.util.jar.enableMultiRelease=false MultiReleaseJarHttpProperties
  40  * @run testng/othervm -Djdk.util.jar.version=9 -Djdk.util.jar.enableMultiRelease=false MultiReleaseJarHttpProperties
  41  * @run testng/othervm -Djdk.util.jar.version=10 -Djdk.util.jar.enableMultiRelease=false MultiReleaseJarHttpProperties
  42  * @run testng/othervm -Djdk.util.jar.version=8 -Djdk.util.jar.enableMultiRelease=force MultiReleaseJarHttpProperties
  43  * @run testng/othervm -Djdk.util.jar.version=9 -Djdk.util.jar.enableMultiRelease=force MultiReleaseJarHttpProperties
  44  * @run testng/othervm -Djdk.util.jar.version=10 -Djdk.util.jar.enableMultiRelease=force MultiReleaseJarHttpProperties
  45  * @run testng/othervm -Djdk.util.jar.enableMultiRelease=false MultiReleaseJarHttpProperties
  46  * @run testng/othervm -Djdk.util.jar.enableMultiRelease=force MultiReleaseJarHttpProperties
  47  */
  48 
  49 import java.io.IOException;
  50 import java.net.URL;
  51 import java.net.URLClassLoader;
  52 
  53 import org.testng.Assert;
  54 import org.testng.annotations.AfterClass;
  55 import org.testng.annotations.BeforeClass;
  56 import org.testng.annotations.Test;
  57 
  58 public class MultiReleaseJarHttpProperties extends MultiReleaseJarProperties {
  59     private SimpleHttpServer server;
  60 
  61     @BeforeClass
  62     public void initialize() throws Exception {
  63         server = new SimpleHttpServer();
  64         server.start();


   1 /*
   2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  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 /*
  25  * @test
  26  * @bug 8132734 8194070
  27  * @summary Test the System properties for JarFile that support multi-release jar files
  28  * @library /lib/testlibrary/java/util/jar
  29  * @modules jdk.jartool
  30  *          jdk.compiler
  31  *          jdk.httpserver
  32  * @build Compiler JarBuilder CreateMultiReleaseTestJars SimpleHttpServer
  33  * @run testng MultiReleaseJarHttpProperties
  34  * @run testng/othervm -Djdk.util.jar.version=0   MultiReleaseJarHttpProperties
  35  * @run testng/othervm -Djdk.util.jar.version=8   MultiReleaseJarHttpProperties
  36  * @run testng/othervm -Djdk.util.jar.version=9   MultiReleaseJarHttpProperties

  37  * @run testng/othervm -Djdk.util.jar.version=100 MultiReleaseJarHttpProperties
  38  * @run testng/othervm -Djdk.util.jar.version=8   -Djdk.util.jar.enableMultiRelease=false MultiReleaseJarHttpProperties
  39  * @run testng/othervm -Djdk.util.jar.version=9   -Djdk.util.jar.enableMultiRelease=false MultiReleaseJarHttpProperties

  40  * @run testng/othervm -Djdk.util.jar.version=8   -Djdk.util.jar.enableMultiRelease=force MultiReleaseJarHttpProperties
  41  * @run testng/othervm -Djdk.util.jar.version=9   -Djdk.util.jar.enableMultiRelease=force MultiReleaseJarHttpProperties

  42  * @run testng/othervm -Djdk.util.jar.enableMultiRelease=false MultiReleaseJarHttpProperties
  43  * @run testng/othervm -Djdk.util.jar.enableMultiRelease=force MultiReleaseJarHttpProperties
  44  */
  45 
  46 import java.io.IOException;
  47 import java.net.URL;
  48 import java.net.URLClassLoader;
  49 
  50 import org.testng.Assert;
  51 import org.testng.annotations.AfterClass;
  52 import org.testng.annotations.BeforeClass;
  53 import org.testng.annotations.Test;
  54 
  55 public class MultiReleaseJarHttpProperties extends MultiReleaseJarProperties {
  56     private SimpleHttpServer server;
  57 
  58     @BeforeClass
  59     public void initialize() throws Exception {
  60         server = new SimpleHttpServer();
  61         server.start();


< prev index next >