Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6973685

JFileChooser throws NullPointerException

    Details

    • Subcomponent:
    • Introduced In Version:
    • CPU:
      x86
    • OS:
      windows_7

      Description

      FULL PRODUCT VERSION :
      The problem occurs in the latest Sun JRE 5.0, Sun JRE 6.0 and even in JRockit 1.6.0_20-b02

      ADDITIONAL OS VERSION INFORMATION :
      Windows 7 Home, Russian version

      A DESCRIPTION OF THE PROBLEM :
      javax.swing.JFileChooser no-arg constructor throws NullPointerException:

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create the simplest Java Application and try to create JFileChooser.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      New file chooser is created and the program is successfully terminated
      ACTUAL -
      The java.lang.NullPointerException is thrown

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Exception in thread "Main Thread" java.lang.NullPointerException
      at sun.awt.shell.Win32ShellFolder2$7.call(Win32ShellFolder2.java:550)
      at sun.awt.shell.Win32ShellFolder2$7.call(Win32ShellFolder2.java:547)
      at sun.awt.shell.Win32ShellFolderManager2$ComInvoker.invoke(Win32ShellFolderManager2.java:518)
      at sun.awt.shell.ShellFolder.invoke(ShellFolder.java:399)
      at sun.awt.shell.ShellFolder.invoke(ShellFolder.java:385)
      at sun.awt.shell.Win32ShellFolder2.getFileSystemPath(Win32ShellFolder2.java:547)
      at sun.awt.shell.Win32ShellFolder2.access$300(Win32ShellFolder2.java:55)
      at sun.awt.shell.Win32ShellFolder2$11.call(Win32ShellFolder2.java:727)
      at sun.awt.shell.Win32ShellFolder2$11.call(Win32ShellFolder2.java:718)
      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:487)
      at java.lang.Thread.run(Thread.java:619)

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      package com;

      import javax.swing.*;

      public class EntryPoint {
          public static void main(String[] args) throws Exception {
              new JFileChooser();
          }
      }
      ---------- END SOURCE ----------

      SUPPORT :
      YES

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: