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.
May be mac specific. Create a new library wrapper module. On the Select Library page of the wizard, click the Browse button to find the library. Enter /tmp manually in the file chooser's selected file box. Press enter. The following exception is thrown: java.lang.ArrayIndexOutOfBoundsException: 0 at org.netbeans.modules.apisupport.project.ui.wizard.LibraryStartVisualPanel.browseLibraryButtonActionPerformed(LibraryStartVisualPanel.java:385) at org.netbeans.modules.apisupport.project.ui.wizard.LibraryStartVisualPanel.access$100(LibraryStartVisualPanel.java:43) at org.netbeans.modules.apisupport.project.ui.wizard.LibraryStartVisualPanel$3.actionPerformed(LibraryStartVisualPanel.java:311) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202) 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:234) at java.awt.Component.processMouseEvent(Component.java:5554) at javax.swing.JComponent.processMouseEvent(JComponent.java:3126) at java.awt.Component.processEvent(Component.java:5319) at java.awt.Container.processEvent(Container.java:2010) at java.awt.Component.dispatchEventImpl(Component.java:4021) at java.awt.Container.dispatchEventImpl(Container.java:2068) at java.awt.Component.dispatchEvent(Component.java:3869) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3936) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866) at java.awt.Container.dispatchEventImpl(Container.java:2054) at java.awt.Window.dispatchEventImpl(Window.java:1774) at java.awt.Component.dispatchEvent(Component.java:3869) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:180) at java.awt.Dialog$1.run(Dialog.java:517) at java.awt.Dialog$2.run(Dialog.java:545) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Dialog.show(Dialog.java:543) at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:812) at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:846) at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:834) at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:82) at org.openide.util.Mutex.doEventAccess(Mutex.java:1201) at org.openide.util.Mutex.readAccess(Mutex.java:220) at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:819) at java.awt.Component.show(Component.java:1300) at java.awt.Component.setVisible(Component.java:1253) at org.openide.loaders.TemplateWizard.instantiateImpl(TemplateWizard.java:479) at org.openide.loaders.TemplateWizard.instantiate(TemplateWizard.java:346) at org.netbeans.modules.project.ui.actions.NewProject$2.run(NewProject.java:117) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Looks like a bug in the Mac filechooser. NB has simply opened a JFileChooser in FILES_ONLY mode, and showDialog has returned APPROVE_OPTION yet selectedFiles.length == 0, which is I think impermissible. (After entering a dir name such as /tmp and pressing enter, the chooser should traverse that dir, not close.) Does not happen to me on Linux. What build are you using? What JDK?
Latest 1.5 on mac: java version "1.5.0_07" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164) Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)
Well I could easily check for selectedFiles.length == 0 and do nothing (you would have to reopen the file chooser) but that would not help much. Could I ask you to instead file a bug for Apple?
Need to file a Mac bug, I think.
Originally filed for 6.0, right? Version field should never be moved forward just because the bug has not been fixed yet.
Not reproducible on current Mac OS Java update