< prev index next >

test/sun/net/www/protocol/jar/MultiReleaseJarURLConnection.java

Print this page




   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 8144062 8159785
  27  * @summary Test that URL connections to multi-release jars can be runtime versioned
  28  * @library /lib/testlibrary/java/util/jar
  29  * @modules java.compiler
  30  *          jdk.compiler
  31  *          jdk.httpserver
  32  *          jdk.jartool
  33  * @build Compiler JarBuilder CreateMultiReleaseTestJars SimpleHttpServer
  34  * @run testng MultiReleaseJarURLConnection
  35  */
  36 
  37 import java.io.IOException;
  38 import java.io.InputStream;
  39 import java.lang.invoke.MethodHandle;
  40 import java.lang.invoke.MethodHandles;
  41 import java.lang.invoke.MethodType;
  42 import java.net.JarURLConnection;
  43 import java.net.URL;
  44 import java.net.URLClassLoader;
  45 import java.net.URLConnection;
  46 import java.nio.file.Files;
  47 import java.nio.file.Paths;
  48 import java.util.Enumeration;
  49 import java.util.jar.JarFile;
  50 




   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 8144062 8159785
  27  * @summary Test that URL connections to multi-release jars can be runtime versioned
  28  * @library /lib/testlibrary/java/util/jar
  29  * @modules jdk.compiler

  30  *          jdk.httpserver
  31  *          jdk.jartool
  32  * @build Compiler JarBuilder CreateMultiReleaseTestJars SimpleHttpServer
  33  * @run testng MultiReleaseJarURLConnection
  34  */
  35 
  36 import java.io.IOException;
  37 import java.io.InputStream;
  38 import java.lang.invoke.MethodHandle;
  39 import java.lang.invoke.MethodHandles;
  40 import java.lang.invoke.MethodType;
  41 import java.net.JarURLConnection;
  42 import java.net.URL;
  43 import java.net.URLClassLoader;
  44 import java.net.URLConnection;
  45 import java.nio.file.Files;
  46 import java.nio.file.Paths;
  47 import java.util.Enumeration;
  48 import java.util.jar.JarFile;
  49 


< prev index next >