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.

Bug 188522 - Make a new JFileChooser throws a NullPointerException
Summary: Make a new JFileChooser throws a NullPointerException
Status: CLOSED DUPLICATE of bug 188369
Alias: None
Product: platform
Classification: Unclassified
Component: JDK Problems (show other bugs)
Version: 6.x
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Antonin Nebuzelsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-09 09:02 UTC by le2tbomi
Modified: 2011-06-09 18:58 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description le2tbomi 2010-07-09 09:02:42 UTC
Product Version = NetBeans IDE 6.9 (Build 201006101454)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.6.0_18
Runtime = Java HotSpot(TM) Client VM 16.0-b13

In a brandly new Maven Project, and doing nothing else but (in main method) :
new JFileChooser();

There is a NullPointer Exception. Stack trace below :

Exception in thread "main" java.lang.NullPointerException
        at sun.awt.shell.Win32ShellFolder2$1.call(Win32ShellFolder2.java:230)
        at sun.awt.shell.Win32ShellFolder2$1.call(Win32ShellFolder2.java:225)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Win32ShellFolderManager2.java:480)
        at java.lang.Thread.run(Thread.java:619)

The only class of the project is this one :

import javax.swing.JFileChooser;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        new JFileChooser();
    }
}

Can be reproduce in all Maven project. Java "standard" projects works fine.

Thank you.
Comment 1 Antonin Nebuzelsky 2010-07-30 13:55:11 UTC
Both Ant and Maven projects do the same for me. The project gets built and ran and the execution finishes immediately with BUILD SUCCESSFUL message. No exception, no other output from the execution.

BTW, only constructing JFileChooser and immediately quiting the main method should not do anything else than what I saw above.
Comment 2 flybyray 2010-12-22 16:16:43 UTC
Try to change the USERPROFILE environment variable. That will crash!
Comment 3 Marian Mirilovic 2011-06-09 18:58:33 UTC

*** This bug has been marked as a duplicate of bug 188369 ***
Comment 4 Marian Mirilovic 2011-06-09 18:58:48 UTC
v/c