Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8210274

Source Launcher should work with a security manager

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 12
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b14

      Description

      Currently, the Single-file source launcher does not work when a security manager is installed. It should.

       source launcher fails when running security manager.

      $ java -Djava.security.manager Main.java
      Exception in thread "main" java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.jdk.internal.misc")
      at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
      at java.base/java.security.AccessController.checkPermission(AccessController.java:895)
      at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:322)
      at java.base/java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1238)
      at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:174)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      at jdk.compiler/com.sun.tools.javac.launcher.Main.main(Main.java:126)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jjg Jonathan Gibbons
              Reporter:
              jjg Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: