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.
Netbeans 4.0 wasn't selectable on the bug reporter page. But I was giving the daily build from July 28 a try. I attempted to add a project to the classpath for compiling sources of another project and when ever I try to navigate into a directory with the Add Project file dialog I get this exception: java.lang.NullPointerException at org.openide.filesystems.FileUtil.normalizeFile(FileUtil.java:939) at org.netbeans.modules.java.j2seproject.ui.customizer.AntArtifact Chooser.propertyChange(AntArtifactChooser.java:120) at javax.swing.event.SwingPropertyChangeSupport.firePropertyCha nge(SwingPropertyChangeSupport.java:264) at javax.swing.event.SwingPropertyChangeSupport.firePropertyCha nge(SwingPropertyChangeSupport.java:232) at javax.swing.JComponent.firePropertyChange(JComponent.java: 3819) at javax.swing.JFileChooser.setSelectedFile(JFileChooser.java:454) at apple.laf.AquaFileChooserUI$SelectionListener.valueChanged(Aq uaFileChooserUI.java:624) at javax.swing.DefaultListSelectionModel.fireValueChanged(Default ListSelectionModel.java:187) at javax.swing.DefaultListSelectionModel.fireValueChanged(Default ListSelectionModel.java:167) at javax.swing.DefaultListSelectionModel.fireValueChanged(Default ListSelectionModel.java:214) at javax.swing.DefaultListSelectionModel.changeSelection(DefaultLi stSelectionModel.java:402) at javax.swing.DefaultListSelectionModel.changeSelection(DefaultLi stSelectionModel.java:411) at javax.swing.DefaultListSelectionModel.removeSelectionInterval(D efaultListSelectionModel.java:481) at javax.swing.DefaultListSelectionModel.clearSelection(DefaultListS electionModel.java:416) at javax.swing.JTable.clearSelection(JTable.java:1262) at apple.laf.AquaFileChooserUI.openDirectory(AquaFileChooserUI.ja va:659) at apple.laf.AquaFileChooserUI$DoubleClickListener.mouseClicked( AquaFileChooserUI.java:681) at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaste r.java:212) at java.awt.Component.processMouseEvent(Component.java:5160) at java.awt.Component.processEvent(Component.java: 4954) at java.awt.Container.processEvent(Container.java:1607) at java.awt.Component.dispatchEventImpl(Component.java: 3672) at java.awt.Container.dispatchEventImpl(Container.java: 1665) at java.awt.Component.dispatchEvent(Component.java: 3534) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.ja va:3521) at java.awt.LightweightDispatcher.processMouseEvent(Container.ja va:3245) at java.awt.LightweightDispatcher.dispatchEvent(Container.java: 3166) at java.awt.Container.dispatchEventImpl(Container.java: 1651) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java: 3534) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java: 481) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Event DispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDis patchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDis patchThread.java:174) at java.awt.Dialog$1.run(Dialog.java:540) at java.awt.Dialog.show(Dialog.java:561) at javax.swing.JFileChooser.showDialog(JFileChooser.java: 696) at javax.swing.JFileChooser.showOpenDialog(JFileChooser.java:599) at org.netbeans.modules.java.j2seproject.ui.customizer.AntArtifact Chooser.showDialog(AntArtifactChooser.java:188) at org.netbeans.modules.java.j2seproject.ui.customizer.VisualClass pathSupport$ClasspathSupportListener.actionPerformed(VisualCl asspathSupport.java:332) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.j ava:1819) at javax.swing.AbstractButton$ForwardActionEvents.actionPerform ed(AbstractButton.java:1872) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButt onModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel. java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicB uttonListener.java:247) at java.awt.Component.processMouseEvent(Component.java:5157) at java.awt.Component.processEvent(Component.java: 4954) at java.awt.Container.processEvent(Container.java:1607) at java.awt.Component.dispatchEventImpl(Component.java: 3672) at java.awt.Container.dispatchEventImpl(Container.java: 1665) at java.awt.Component.dispatchEvent(Component.java: 3534) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.ja va:3521) at java.awt.LightweightDispatcher.processMouseEvent(Container.ja va:3236) at java.awt.LightweightDispatcher.dispatchEvent(Container.java: 3166) at java.awt.Container.dispatchEventImpl(Container.java: 1651) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java: 3534) at java.awt.EventQueue.dispatchEvent(EventQueue.java: 481) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Event DispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDis patchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread .java:178) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread .java:170) at java.awt.EventDispatchThread.run(EventDispatchThread.java: 100) this makes it impossible to add classpath dependencies
Yes, it seems that the file chooser on Macs (but not other platforms) fires SELECTED_FILE_CHANGED_PROPERTY with selectedFile == null every time you move directories, so this otherwise obscure case (possible on other platforms only if you manually Ctrl-click to deselect a file) tends to get noticed on Macs first. Easy patch.
Sounds like the underlying issue should be reported on Apple's Bug Reporter?
No, the Apple (Aqua) chooser behavior is not a bug, I think; just different from other platforms. committed Up-To-Date 1.8 java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/AntArtifactChooser.java
BTW swpalmer: use version "promo-D" for 4.0 development builds.
*** Issue 46905 has been marked as a duplicate of this issue. ***
*** Issue 47833 has been marked as a duplicate of this issue. ***