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.
A null pointer exception is encountered when a new empty Java file to the project. The following will reliably reproduce the problem: Project>Project Manager>New... In the "Create New Project" dialog enter the project name, "test", then click "Ok" Using the "Java 2 Standard Edition" radio button selection, click the "Finish" button. In the Netbeans Explorer click the "Project test" tab Right click the "Project test" and select "Add new..." from the pop up menu. From the templates list in the "New Wizard" dialog, select "Java Classes">"Empty Java File" Click "Next" In the Target Location, "Folder:" textbox, try to enter a path. For me, the path was to be c:\something, but the exception occurs on entering the first character, 'c'. The enclosed ide.log file starts at the point the 'test' project exists and a the "Java Classes">"Empty Java File" is selected. The workaround appears to be mounting any file system before attempting to add project members.
Created attachment 13715 [details] ide.log starting with existing new project and attempting to add empty file
Reassigning for evaluation. There should be some better message than exception.
The NPE was fixed a long time ago in DataFolderPanel. For the rest, passing to core/projects - it shouldn't let you create files if you have no filesystems mounted. The new build system should take care of this.
I agree with Tim. The new build system uses MasterFS and removed the mounting concept. It is solution for this issue.
In new build system, should disable New action when no projects are open. That would suffice.
The NewFile action is disabled in the new project system and there should be always one filesys mounted. (The master fs)
More to the point, File -> New (Ctrl-N) is enabled only if at least one project is open.
This issue was solved long time ago. Because nobody has reopened it neither added comments, we are verifying/closing it now. If you are still able to reproduce the problem, please reopen. Thanks in advance.