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.
I got the following message when trying to start Netbeans 5.5: A java.lang.NullPointerException exception has occurred. Please report this at http://www.netbeans.org/community/issues.html, including a copy of your messages.log file as an attachment.
Created attachment 38309 [details] Null Pointer Exception when invoking file chooser (messages.log)
Seems like a duplicate of issue #60757 to me. Please see the last comment by twuersch in that bug to see possible cause of the problem. Thanks. *** This issue has been marked as a duplicate of 60757 ***
I am so sorry, the link to http://wiki.java.net/bin/view/Netbeans/FaqRunningOnJre is not found. I could not find a resolution at http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6210674 The problem came up right after installation. I did not move anything around. I suppose the solution is to link netbeans to JDK instead of to JRE? How can I find out to which module netbeans is linking itself currently? During installation netbeans searched for the appropriate JDK and found JDK 1.6.0. I assume this is what it is using. All the buttons are whacked out. Is there a way to do this outside of the IDE? Thanks for your help.
Referring to problem description at http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6210674 "Create a java application, set the L&F to system, create a JFileChooser. Prerequisits is of course a external harddrive with custom icon." Netbeans is not installed on an external hard drive. No custom icon is being setup. I don't know what 'set the L&F to system' mean, so most likely I didn't perform this action. JDK is located on the same drive as netbeans.
Hi, the problem is very unlikely to be in Netbeans, could you please try the following: 1. Open console (e.g. run cmd.exe) 2. On command line: java -version<enter> It should say something like 1.6.0 3. On command line: java -jar <your-java-home>\demo\jfc\FileChooserDemo\FileChooserDemo.jar<enter> I am not sure where your JDK is installed, but from the log file you attached it seems to be in H:\Program Files\Java\jdk1.6.0\, so use this for <your-java-home>. This will start a simple swing app that demonstrates the use of FileChooser. If you click the 'Show FileChooser' button and get the NullPointerException then the problem is in you JDK installation. And I would suggest reinstalling it. Thanks.
Any luck?
Hello, Thank you for your direction. I ran the demo as you instructed. The 'Show FileChooser' button works with no hitches. I started Netbeans right after that and it still gives me the same behavior. I would appreciate any directions you can give me to identify and fix the problem.
on the command prompt, java -version returns 1.6.0.
I see. I am sorry I was not clear in my instructions. There is a combobox called 'Look and Feel' in the FileChooserDemo application, which lets you choose the look and feel for the demo application and for the filechooser dialog. As described in the JDK bug the problem occurs when the Look and Feel is set to 'Windows'. Have you tried that? Could you please try it? Also, the JDK bug description says that no matter where your netbeans or JDK is installed if there is a special drive on your PC (eg. firewire is what they mentioned) the JFileChooser will crash when using Windows L&F. From the bug description it is looking like that there will be no obvious connection between the cause of the problem and Netbeans or JDK. It might be a special hardware, which looks like a disk in Windows (eg. a camera, USB stick, ...). Another thing you could try is forcing Netbeans to use a different L&F (e.g. Metal). This can be done on the command line when starting netbeans, just add the following parameter: -laf javax.swing.plaf.metal.MetalLookAndFeel Netbeans should start as usually, but will use Metal L&F, which means they will look a little bit different than what you've seen before. The JFileChooser dialog should work, because it won't try to look like its native windows version and will use its own icons, layout, etc. Please try that and let me know.
I started the FileChooserDemo, picked windows L&F and was able to replicate the NullPointerException. I started Netbeans with netbeans.exe -laf javax.swing.plaf.metal.MetalLookAndFeel and it seems to have fixed the problem. Thank you very much for your help!
Great! Well, we haven't really fixed it, but hopefully the JDK bug will get fixed soon and you will be able to use the native Windows L&F without any problems. Thanks.
Reopened so that it can be closed as a duplicate of another issue.
*** This issue has been marked as a duplicate of 61438 ***