troubleshooting Question

java filecheeser error on UNC path

Avatar of karanba
karanba asked on
Java
3 Comments1 Solution874 ViewsLast Modified:
Hi the following code get exception when try to use a network share path like \\computer_name\share_name. For local directory no problem. And there is no permission problem on share...
-------------------------------------------------------------------------------------
      JFileChooser fc = new JFileChooser();
      fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
      fc.setAcceptAllFileFilterUsed(false);
      int retval = fc.showOpenDialog(frame);

      if(retval == JFileChooser.APPROVE_OPTION){
            String path = fc.getCurrentDirectory().toString();
            System.out.println(path);
      }else {
            System.out.println("No Selection ");
      }
-----------------------------------------------------------
Exception in thread "Basic L&F File Loading Thread" java.lang.InternalError: Unable to bind \\computer_name\share_name to parent
      at sun.awt.shell.Win32ShellFolder2.getIShellFolder(Win32ShellFolder2.java:322)
      at sun.awt.shell.Win32ShellFolder2.listFiles(Win32ShellFolder2.java:538)
      at javax.swing.filechooser.FileSystemView.getFiles(FileSystemView.java:422)
      at javax.swing.plaf.basic.BasicDirectoryModel$LoadFilesThread.run(BasicDirectoryModel.java:195)
 
___________________________________________
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros