This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In the Project Properties dialog, under Build->Compiling Sources, I pressed the "Add Jar File" button and got the following NPE: java.lang.NullPointerException at javax.swing.ImageIcon.<init>(ImageIcon.java:161) at javax.swing.ImageIcon.<init>(ImageIcon.java:147) at com.sun.java.swing.plaf.windows.WindowsFileChooserUI$ShortCutPanel.<init>(WindowsFileChooserUI.java:603) at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installComponents(WindowsFileChooserUI.java:361) at javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:130) at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(WindowsFileChooserUI.java:176) at javax.swing.JComponent.setUI(JComponent.java:449) at javax.swing.JFileChooser.updateUI(JFileChooser.java:1701) at javax.swing.JFileChooser.setup(JFileChooser.java:345) at javax.swing.JFileChooser.<init>(JFileChooser.java:320) at javax.swing.JFileChooser.<init>(JFileChooser.java:273) at org.netbeans.modules.java.j2seproject.ui.customizer.VisualClasspathSupport$ClasspathSupportListener.actionPerformed(VisualClasspathSupport.java:295) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245) at java.awt.Component.processMouseEvent(Component.java:5100) at java.awt.Component.processEvent(Component.java:4897) at java.awt.Container.processEvent(Container.java:1569) at java.awt.Component.dispatchEventImpl(Component.java:3615) at java.awt.Container.dispatchEventImpl(Container.java:1627) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128) at java.awt.Container.dispatchEventImpl(Container.java:1613) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3477) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Created attachment 17232 [details] messages.log file
Why 'nbbuild'? That is used for the NB build process, not even part of the distributed IDE at all. Use the component 'ide' if you are not sure where to file a bug. Looks like some bug in the Win L&F. Reporter, please try 1.4.2_04.
May be unreproducible.
I have not been able to reproduce it myself since it happened. It is also worth showing this stack trace to the Swing FileChooser owner to see if it might be a JDK problem.
I fixed this a couple days ago. It is a bug in Windows L&F, but you can work around it by forcing the file chooser ui to initialize during startup (basically just run the code that produces an NPE until it doesn't). Windows L&F loads system icons lazily on some background thread, but the file chooser UI can try to use them before they are loaded. It is not a problem in 1.5. *** This issue has been marked as a duplicate of 38479 ***
v