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

REGRESSION : An exception comes to occur in jdk5.0u17 in JFileChooser

XMLWordPrintable

        An exception comes to occur in jdk5.0u17(and later versions), but does not in jdk5.0u16.

        C:\users\licensees\NPE-null-FileChooser>appletviewer -J-Djava.security.policy=policy a.html
        Exception in thread "Basic L&F File Loading Thread" java.security.AccessControlException: access denied (java.io.FilePermission C:\Documents and Settings\tbaba\My Documents read)
                at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
                at java.security.AccessController.checkPermission(AccessController.java:427)
                at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
                at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
                at sun.awt.shell.Win32ShellFolder2.listFiles(Win32ShellFolder2.java:523)

                at javax.swing.filechooser.FileSystemView.getFiles(FileSystemView.java:422)
                at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run(BasicDirectoryModel.java:211)


        REPRODUCE:
        1) Compile the attached a.java
        2) Set the attached "policy"and a.html filse to the dir. of 1)
        3) Invoke the following command line.
         appletviewer -J-Djava.security.policy=policy a.html

        You will see the above exception.
        (for a littl bit more details, please see the attached exceptions-in-jdk50ux)

              skoppar Sunita Koppar (Inactive)
              tbaba Tadayuki Baba (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: