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

getClass().getResource(path) returns null in Applet running from file system

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • 9
    • 7u25, 8, 9
    • deploy

      Our plugin demos are failing.

      Install the SwingSet2 JFC demo locally and try launching the html file. The NPE appears. Seen on windows and linux.

      basic: Applet loaded.
      basic: Applet resized and added to parent container
      basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 107496 us, pluginInit dt 6443489 us, TotalTime: 6550985 us
      java.lang.NullPointerException
      at javax.swing.ImageIcon.<init>(Unknown Source)
      at SwingSet2.createImageIcon(SwingSet2.java:944)
      at DemoModule.createImageIcon(DemoModule.java:135)
      at InternalFrameDemo.<init>(InternalFrameDemo.java:105)
      at SwingSet2.preloadFirstDemo(SwingSet2.java:674)
      at SwingSet2.<init>(SwingSet2.java:201)
      at SwingSet2.<init>(SwingSet2.java:177)
      at SwingSet2Applet.init(SwingSet2Applet.java:59)
      at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.init(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Ignored exception: java.lang.NullPointerException

      This works fine in 7u7 for me. It fails in 7u25. I haven't tested between those two releases. We shouldn't have demos failing for us. Poor image.

            vsaiprasad Vikas Saiprasad
            coffeys Sean Coffey
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: