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

java.lang.ExceptionInInitializerError thrown from FileSystemView.getRoots() on Windows/JDK7b65

XMLWordPrintable

      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.

            rupashka Pavel Porvatov (Inactive)
            dbessono Dmitry Bessonov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: