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

jjs fails to run simple scripts with security manager turned on

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b99
    • CPU:
      generic
    • OS:
      generic

      Description

      jjs -J-Djava.security.manager -doe

      jjs> java.lang.System.out.println("hello")
      java.security.AccessControlException: access denied ("java.lang.RuntimePermissio
      n" "accessClassInPackage.sun.reflect")
      java.security.AccessControlException: access denied ("java.lang.RuntimePermissio
      n" "accessClassInPackage.sun.reflect")
              at java.security.AccessControlContext.checkPermission(AccessControlConte
      xt.java:468)
              at java.security.AccessController.checkPermission(AccessController.java:
      894)
              at java.lang.SecurityManager.checkPermission(SecurityManager.java:541)
              at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:149
      7)
              at java.lang.ClassLoader$1.run(ClassLoader.java:501)
              at java.lang.ClassLoader$1.run(ClassLoader.java:499)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.lang.ClassLoader.checkPackageAccess(ClassLoader.java:499)
              at jdk.dynalink.beans.AbstractJavaLinker.createDynamicMethod(AbstractJav
      aLinker.java:292)
              at jdk.dynalink.beans.AbstractJavaLinker.addMember(AbstractJavaLinker.ja
      va:257)
              at jdk.dynalink.beans.AbstractJavaLinker.<init>(AbstractJavaLinker.java:
      143)
              at jdk.dynalink.beans.AbstractJavaLinker.<init>(AbstractJavaLinker.java:
      130)
              at jdk.dynalink.beans.StaticClassLinker$SingleClassStaticsLinker.<init>(
      StaticClassLinker.java:117)
              at jdk.dynalink.beans.StaticClassLinker$1.computeValue(StaticClassLinker
      .java:109)
              at jdk.dynalink.beans.StaticClassLinker$1.computeValue(StaticClassLinker
      .java:106)
              at java.lang.ClassValue.getFromHashMap(ClassValue.java:226)
              at java.lang.ClassValue.getFromBackup(ClassValue.java:208)
              at java.lang.ClassValue.get(ClassValue.java:114)
              at jdk.dynalink.beans.StaticClassLinker.getGuardedInvocation(StaticClass
      Linker.java:190)
              at jdk.nashorn.internal.runtime.linker.NashornBeansLinker.getGuardedInvo
      cation(NashornBeansLinker.java:140)
              at jdk.nashorn.internal.runtime.linker.NashornStaticClassLinker.delegate
      (NashornStaticClassLinker.java:104)
              at jdk.nashorn.internal.runtime.linker.NashornStaticClassLinker.getGuard
      edInvocation(NashornStaticClassLinker.java:100)
              at jdk.dynalink.linker.support.CompositeTypeBasedGuardingDynamicLinker.g
      etGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:184)
      [ ... more frames deleted...]

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sundar Sundararajan Athijegannathan
                Reporter:
                sundar Sundararajan Athijegannathan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: