JDK-8193766 : FileSystemView::getShellFolder throws SecurityException which is not mentioned in its specification.
  • Type: Bug
  • Component: client-libs
  • Affected Version: 8,9,10
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2017-12-18
  • Updated: 2021-12-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
Exception in thread "AWT-EventQueue-0" java.security.AccessControlException: access denied ("java.io.FilePermission" "/home/ssadetsky" "read")
	at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
	at java.base/java.security.AccessController.checkPermission(AccessController.java:895)
	at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:558)
	at java.base/java.lang.SecurityManager.checkRead(SecurityManager.java:897)
	at java.base/sun.nio.fs.UnixPath.checkRead(UnixPath.java:818)
	at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:49)
	at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:145)
	at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
	at java.base/java.nio.file.Files.readAttributes(Files.java:1755)
	at java.base/java.nio.file.Files.exists(Files.java:2434)
	at java.desktop/sun.awt.shell.ShellFolder.getShellFolder(ShellFolder.java:247)
	at java.desktop/javax.swing.plaf.basic.BasicFileChooserUI.changeDirectory(BasicFileChooserUI.java:1352)
	at java.desktop/javax.swing.plaf.basic.BasicFileChooserUI.access$000(BasicFileChooserUI.java:50)
	at java.desktop/javax.swing.plaf.basic.BasicFileChooserUI$GoHomeAction.actionPerformed(BasicFileChooserUI.java:1002)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:270)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6589)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3343)
	at java.desktop/java.awt.Component.processEvent(Component.java:6354)
	at java.desktop/java.awt.Container.processEvent(Container.java:2260)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4966)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2318)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4798)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4906)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2304)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4798)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
	at java.desktop/java.awt.EventQueue.access$600(EventQueue.java:97)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:99)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117)
	at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
	at java.desktop/java.awt.EventQueue.access$600(EventQueue.java:97)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Comments
Same issue for FileSystemView::isTraversable: Exception in thread "main" java.security.AccessControlException: access denied ("java.io.FilePermission" "/home/ssadetsky" "read") at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) at java.base/java.security.AccessController.checkPermission(AccessController.java:895) at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:558) at java.base/java.lang.SecurityManager.checkRead(SecurityManager.java:897) at java.base/java.io.File.isDirectory(File.java:845) at java.desktop/sun.awt.shell.ShellFolder.isDirectory(ShellFolder.java:379) at java.desktop/javax.swing.filechooser.FileSystemView.isTraversable(FileSystemView.java:167) at java.desktop/javax.swing.JFileChooser.isTraversable(JFileChooser.java:1623) at java.desktop/javax.swing.JFileChooser.setCurrentDirectory(JFileChooser.java:589) at java.desktop/javax.swing.JFileChooser.<init>(JFileChooser.java:349) at java.desktop/javax.swing.JFileChooser.<init>(JFileChooser.java:295) at JFC.main(JFC.java:5)
18-12-2017