JFilechooser for the remote server

I have a Java application that at some point selects files from the local file system using JFileChooser.showOpenDialog ().

Now I want it in client-server setup. This means opening a GUI (file browser) to select files on the server. I have already tried several scripts to continue using JFileChooser, but I cannot configure the correct setting.

Does anyone know how to create a file browser on a remote server if I know the path that the file browser should use by default in advance? So, for example, if the server address is "http://sand.int.group.com:9083", and at this address the directory that I want to use by default is in "/ home / myDir /". How can I display a file browser window so that it displays files located in a directory on this server?

+3
source share
3 answers

JFileChooserUnable to load url. You will need to display the network share on the computer that wants to view the files.

+3
source

This will serve you, I believe: http://vfsjfilechooser.sourceforge.net/index.html

JFileChooser...

+1

AFAIK this does not work out of the box. Local JFileChooser has no idea about files located on the server side.

Take WebSphere, for example, using the Websphere administration tool, you can deploy local EAR / WAR files to a server, IBM does this using JFileChooser. But when you are going to deploy a file that is located on a remote server, you get a completely different interface. So it seems very complicated.

One possible way would be to implement your own FileSystemView , but I'm not sure if this is just an idea.

0
source

All Articles