JFileChooser and browsing networked machines [clos

2019-02-18 03:25发布

I am working on a little program that needs the ability to let users browse files and directories on networked machines as well as the local filesystem. I made the mistake of developing this component on a Windows machine... it worked fine there, but hid the fact that JFileChooser doesn't really "see" networked drives. On Windows, the "Network Neighborhood" shows up in JFileChooser. But apparently this is not typical, as networked drives are not Files.

When I added the chooser component to my program and tested it on a couple of Linux machines, I discovered what I should have already known... JFileChooser doesn't browse the network. So now I am at a crossroads, and could really use some advice. Is there a (Java) alternative I should be using? Or should I keep working with JFileChooser to coerce it into the behavior I need?

1条回答
劫难
2楼-- · 2019-02-18 03:54

This might help.

查看更多
登录 后发表回答