JDK-6866887 : java.lang.ExceptionInInitializerError thrown from FileSystemView.getRoots() on Windows/JDK7b65
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows
  • CPU: generic
  • Submitted: 2009-07-30
  • Updated: 2012-03-22
  • Resolved: 2009-08-11
Related Reports
Duplicate :  
Description
The following minimized code sample throws java.lang.ExceptionInInitializerError 
on   JDK7 b64, b65
Platform - Windows

------------------------------------------------------------------------------
public class Test {
    public static void main(String[] args) {
        javax.swing.filechooser.FileSystemView.getFileSystemView().getRoots();
    }
}
------------------------------------------------------------------------------


Exception in thread "main" java.lang.ExceptionInInitializerError
        at javax.swing.filechooser.FileSystemView.getRoots(FileSystemView.java:385)
        at Test.main(Test.java:3)
Caused by: java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.String
        at sun.awt.shell.ShellFolder.<clinit>(ShellFolder.java:205)
        ... 2 more

PLEASE NOTE that failure is not reproducible on JDK7b66

Lots of JCK tests fail due to this problem, see comments for detailed list.

Comments
EVALUATION Duplicate of CR 6857870
11-08-2009