< prev index next >

jdk/test/sun/net/www/protocol/jrt/OtherResources.java

Print this page

        

*** 34,44 **** public static void main(String[] args) throws IOException { // check that java.desktop is not in the set of readable modules try { Class.forName("java.awt.Component"); ! throw new RuntimeException("Need to run with -limitmods java.base"); } catch (ClassNotFoundException expected) { } // access resource in the java.desktop module URL url = new URL("jrt:/java.desktop/java/awt/Component.class"); URLConnection uc = url.openConnection(); --- 34,44 ---- public static void main(String[] args) throws IOException { // check that java.desktop is not in the set of readable modules try { Class.forName("java.awt.Component"); ! throw new RuntimeException("Need to run with --limit-modules java.base"); } catch (ClassNotFoundException expected) { } // access resource in the java.desktop module URL url = new URL("jrt:/java.desktop/java/awt/Component.class"); URLConnection uc = url.openConnection();
< prev index next >