< prev index next >

test/java/lang/SecurityManager/CheckPackageAccess.java

Print this page




  69         "com.sun.org.apache.xalan.internal.res.",
  70         "com.sun.org.apache.xalan.internal.templates.",
  71         "com.sun.org.apache.xalan.internal.utils.",
  72         "com.sun.org.apache.xalan.internal.xslt.",
  73         "com.sun.org.apache.xalan.internal.xsltc.cmdline.",
  74         "com.sun.org.apache.xalan.internal.xsltc.compiler.",
  75         "com.sun.org.apache.xalan.internal.xsltc.trax.",
  76         "com.sun.org.apache.xalan.internal.xsltc.util.",
  77         "com.sun.org.apache.xml.internal.res.",
  78         "com.sun.org.apache.xml.internal.resolver.helpers.",
  79         "com.sun.org.apache.xml.internal.resolver.readers.",
  80         "com.sun.org.apache.xml.internal.security.",
  81         "com.sun.org.apache.xml.internal.serializer.utils.",
  82         "com.sun.org.apache.xml.internal.utils.",
  83         "com.sun.org.glassfish.",
  84         "com.oracle.xmlns.internal.",
  85         "com.oracle.webservices.internal.",
  86         "oracle.jrockit.jfr.",
  87         "org.jcp.xml.dsig.internal.",
  88         "jdk.internal.",



  89         "jdk.nashorn.internal.",
  90         "jdk.nashorn.tools.",
  91         "jdk.xml.internal.",
  92         "com.sun.activation.registries."
  93     };
  94 
  95     public static void main(String[] args) throws Exception {
  96         List<String> pkgs = new ArrayList<>(Arrays.asList(packages));
  97         String osName = System.getProperty("os.name");
  98         if (osName.contains("OS X")) {
  99             pkgs.add("apple.");  // add apple package for OS X
 100         } else if (osName.startsWith("Windows")) {
 101             pkgs.add("com.sun.java.accessibility.");
 102         }
 103 
 104         List<String> jspkgs =
 105             getPackages(Security.getProperty("package.access"));
 106 
 107         if (!isOpenJDKOnly()) {
 108             String lastPkg = pkgs.get(pkgs.size() - 1);




  69         "com.sun.org.apache.xalan.internal.res.",
  70         "com.sun.org.apache.xalan.internal.templates.",
  71         "com.sun.org.apache.xalan.internal.utils.",
  72         "com.sun.org.apache.xalan.internal.xslt.",
  73         "com.sun.org.apache.xalan.internal.xsltc.cmdline.",
  74         "com.sun.org.apache.xalan.internal.xsltc.compiler.",
  75         "com.sun.org.apache.xalan.internal.xsltc.trax.",
  76         "com.sun.org.apache.xalan.internal.xsltc.util.",
  77         "com.sun.org.apache.xml.internal.res.",
  78         "com.sun.org.apache.xml.internal.resolver.helpers.",
  79         "com.sun.org.apache.xml.internal.resolver.readers.",
  80         "com.sun.org.apache.xml.internal.security.",
  81         "com.sun.org.apache.xml.internal.serializer.utils.",
  82         "com.sun.org.apache.xml.internal.utils.",
  83         "com.sun.org.glassfish.",
  84         "com.oracle.xmlns.internal.",
  85         "com.oracle.webservices.internal.",
  86         "oracle.jrockit.jfr.",
  87         "org.jcp.xml.dsig.internal.",
  88         "jdk.internal.",
  89         "jdk.jfr.events.",
  90         "jdk.jfr.internal.",
  91         "jdk.management.jfr.internal.",
  92         "jdk.nashorn.internal.",
  93         "jdk.nashorn.tools.",
  94         "jdk.xml.internal.",
  95         "com.sun.activation.registries."
  96     };
  97 
  98     public static void main(String[] args) throws Exception {
  99         List<String> pkgs = new ArrayList<>(Arrays.asList(packages));
 100         String osName = System.getProperty("os.name");
 101         if (osName.contains("OS X")) {
 102             pkgs.add("apple.");  // add apple package for OS X
 103         } else if (osName.startsWith("Windows")) {
 104             pkgs.add("com.sun.java.accessibility.");
 105         }
 106 
 107         List<String> jspkgs =
 108             getPackages(Security.getProperty("package.access"));
 109 
 110         if (!isOpenJDKOnly()) {
 111             String lastPkg = pkgs.get(pkgs.size() - 1);


< prev index next >