I need to display network shares in a JFileChooser. It's possible to show the network shares of the concerning host via the network button. But I'd also like to display them hardcoded by invokation of:
The JFileChooser doesn't do nothing in this case. If I do specify the explicit share ressource it works:
I don't know the shared folders. So, I want to show the list of all shared folders of the concerning host. Is this impossible?
"Wenn man irgendwann mal von allen akzeptiert wird, dann weiß man, dass man irgendwas falsch gemacht hat." Excerpt by: Mr. Weidner
I've tried with my own machine, and if I create a File around an actual share and call its exists() method, it returns true. If I create a File around the network host only (e.g. new File("\\\\hostname")), exists() returns false. As such, java.io.File is not the means to retrieving these. That also means that JFileChooser can't help you out, since it uses java.io.File in the background.