Forum Discussion
matthiasblaesin
12 years agoNew Contributor
Hey,
this would be a behaviour I would expect (someone should fix the block of the AWT thread, but that are details). In this case I did not expand the network icon by hand, but it is "pre-opened".
Ok - I went through the called code and it looks like this is happening:
1. JDirectoryChooser ist instanziated without a default folder
2. this in turn calls the super constructor (JFileChooser) without a default folder
3. the constructor calls JFileChooser#setCurrentDirectory with null argument
4. this causes a call to javax.swing.filechooser.FileSystemView#getDefaultDirectory()
5. this causes a call to ShellFolder.get("fileChooserDefaultFolder")
6. the implementation on windows now uses a native call sun.awt.shell.Win32ShellFolder2#getFileSystemPath0
This is where it goes into flames. My folder "Eigene Dateien" ("Persona Files" in english?!) is a UNC path.
So now I know why it happes, but not how to fix this. I'll have to find a way to override the return of getFileSystemPath0 over the windows defaults. But that is not your problem and caused by our companies network architecture. Thanks for your reply.
mrJames wrote: This behavior happens when you expand the Network tree in the "Select output directory". If the Network tree is not expanded you should not see such a long delay.
this would be a behaviour I would expect (someone should fix the block of the AWT thread, but that are details). In this case I did not expand the network icon by hand, but it is "pre-opened".
Ok - I went through the called code and it looks like this is happening:
1. JDirectoryChooser ist instanziated without a default folder
2. this in turn calls the super constructor (JFileChooser) without a default folder
3. the constructor calls JFileChooser#setCurrentDirectory with null argument
4. this causes a call to javax.swing.filechooser.FileSystemView#getDefaultDirectory()
5. this causes a call to ShellFolder.get("fileChooserDefaultFolder")
6. the implementation on windows now uses a native call sun.awt.shell.Win32ShellFolder2#getFileSystemPath0
This is where it goes into flames. My folder "Eigene Dateien" ("Persona Files" in english?!) is a UNC path.
So now I know why it happes, but not how to fix this. I'll have to find a way to override the return of getFileSystemPath0 over the windows defaults. But that is not your problem and caused by our companies network architecture. Thanks for your reply.