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

Swing applications fail to load System look and feel with security manager enabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Duplicate
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:

      Description

      To reproduce, run any Swing application on MacOS with a security manager enabled. For example:

      $ java -Djava.security.manager SimpleSwingApp
      Exception in thread "AWT-EventQueue-0" java.lang.Error: Cannot load com.apple.laf.AquaLookAndFeel
      at java.desktop/javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1405)
      at java.desktop/javax.swing.UIManager.initialize(UIManager.java:1516)
      at java.desktop/javax.swing.UIManager.maybeInitialize(UIManager.java:1482)
      at java.desktop/javax.swing.UIManager.getUI(UIManager.java:1055)
      at java.desktop/javax.swing.JPanel.updateUI(JPanel.java:126)
      at java.desktop/javax.swing.JPanel.<init>(JPanel.java:86)
      at java.desktop/javax.swing.JPanel.<init>(JPanel.java:109)
      at java.desktop/javax.swing.JPanel.<init>(JPanel.java:117)
      at java.desktop/javax.swing.JRootPane.createGlassPane(JRootPane.java:519)
      at java.desktop/javax.swing.JRootPane.<init>(JRootPane.java:346)
      at java.desktop/javax.swing.JFrame.createRootPane(JFrame.java:279)
      at java.desktop/javax.swing.JFrame.frameInit(JFrame.java:258)
      at java.desktop/javax.swing.JFrame.<init>(JFrame.java:225)
      at SimpleSwingApp.<init>(SimpleSwingApp.java:12)
      at SimpleSwingApp.lambda$main$1(SimpleSwingApp.java:32)
      at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
      at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:759)
      at java.desktop/java.awt.EventQueue.access$500(EventQueue.java:97)
      at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:712)
      at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:706)
      at java.base/java.security.AccessController.doPrivileged(Native Method)
      at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:79)
      at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:729)
      at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:199)
      at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
      at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
      at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
      at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mullan Sean Mullan
              Reporter:
              kcr Kevin Rushforth
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: