This discussion is archived
2 Replies Latest reply: Dec 22, 2008 6:44 AM by 843829 RSS

"InternalError: Could not initialize shell library" from JFileChooser

843829 Newbie
Currently Being Moderated
I get the subject error on the console when I try to open a JFileChooser. I happens only on some machines. Our IT department will not admit there is any difference but one set of machines in the lab usually gets this error. I cannot duplicate it on a machine that I have admin rights to. All machines are running Windows XP SP2 and using Java 1.4.2_12.
I suspect that there is something funky about the file system as it is in a lab and the initial directory is on a network drive. I can access the directory using Windows explorer and cygwin. There are no zip files even nearby.

A partial Stack Trace follows:
java.lang.InternalError: Could not initialize shell library
at sun.awt.shell.Win32ShellFolder2.initIDs(Native Method)
at sun.awt.shell.Win32ShellFolder2.<clinit>(Win32ShellFolder2.java:65)
at sun.awt.shell.Win32ShellFolderManager2.getDesktop(Win32ShellFolderManager2.java:80)
at sun.awt.shell.Win32ShellFolderManager2.get(Win32ShellFolderManager2.java:177)
at sun.awt.shell.ShellFolder.get(ShellFolder.java:245)
at javax.swing.filechooser.FileSystemView.getRoots(FileSystemView.java:335)
at javax.swing.filechooser.WindowsFileSystemView.getHomeDirectory(FileSystemView.java:649)
at javax.swing.plaf.metal.MetalFileChooserUI.installComponents(MetalFileChooserUI.java:214)
at javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:130)
at javax.swing.plaf.metal.MetalFileChooserUI.installUI(MetalFileChooserUI.java:152)
at javax.swing.JComponent.setUI(JComponent.java:449)
at javax.swing.JFileChooser.updateUI(JFileChooser.java:1701)
at javax.swing.JFileChooser.setup(JFileChooser.java:345)
at javax.swing.JFileChooser.<init>(JFileChooser.java:320)
at javax.swing.JFileChooser.<init>(JFileChooser.java:303)
. . .