Hi all,
I have a dialog for selecting a file or a remote server, it has a JFileChooser which displays the contents of directory data which is in the current directory.
I was
testing my error handling for when I don't have an RMI registry running. Then it displays a message box with an error and should create new JFileChooser but cannot do this anymore. Even reusing the existing JFileChooser doesn't work anymore!
Note that is has problems with my home dir / desktop dir althoug i'm not running it from that dir. Is this a
Java bug?
Exception in
thread "main" java.security.AccessControlException: access denied (
java.io.FilePermission C:\Documents and Settings\XXXXX\Desktop read)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:270)
at java.security.AccessController.checkPermission(AccessController.java:
401)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
at java.lang.SecurityManager.checkRead(SecurityManager.java:887)
at java.io.File.exists(File.java:677)
at sun.awt.shell.ShellFolder.exists(ShellFolder.java:257)
at javax.swing.filechooser.FileSystemView.getSystemDisplayName(FileSyste
mView.java:140)
at javax.swing.plaf.basic.BasicFileChooserUI$BasicFileView.getName(Basic
FileChooserUI.java:1023)
at javax.swing.plaf.metal.MetalFileChooserUI.installComponents(MetalFile
ChooserUI.java:216)
at javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserU
I.java:130)
at javax.swing.plaf.metal.MetalFileChooserUI.installUI(MetalFileChooserU
I.java:152)
at javax.swing.JComponent.setUI(JComponent.java:449)
at javax.swing.JFileChooser.updateUI(JFileChooser.java:1700)
at javax.swing.JFileChooser.setup(JFileChooser.java:345)
at javax.swing.JFileChooser.<init>(JFileChooser.java:320)
at javax.swing.JFileChooser.<init>(JFileChooser.java:303)
at suncertify.client.Gui.selectDatabaseDialog(Gui.java:271)
at suncertify.client.Gui.<init>(Gui.java:38)
at suncertify.client.Gui.main(Gui.java:366)