Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFileChooser and network share

 
Andreas Pax Lück
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends!

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?

Best regards


PAX
 
Rob Spoor
Sheriff
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Andreas Pax Lück
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, that's really bad.

thanks for your help.

best regards

PAX
 
Maneesh Godbole
Saloon Keeper
Posts: 11178
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
 
Andreas Pax Lück
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
these are interesting information. does the nethood location also have a common caption? i realized that its name isn't "NetHood" on systems with a different language than english.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic