PDA

View Full Version : jFilechooser browsing network



bobvanderputten
April 14th, 2010, 08:36 PM
I wrote some program that uses JAVA jFilechooser. Under Windows, I can get to external network drive's. Under Ubuntu, I can only browse through local drive's Even when the network drive was mounted. How can I get the network drive from within a jFilechooser?

Morbius1
April 14th, 2010, 09:15 PM
I can only browse through local drive's Even when the network drive was mounted.

If you're mounting it through Nautilus is has a hidden mount point at:

/home/your_user_name/.gvfs

I know nothing of jFilechooser but the question becomes - can it access a hidden directory. If not then you may need to create a symbolic link to a "real" directory.

bobvanderputten
April 16th, 2010, 06:29 PM
Thanks Morbius1.
I mounted the external network drive by Nautilus. I can see the /home/your_user_nam/.gvfs file and browse through the directory mentioned there.
I can see .gvfs/public on 192.168.2.3/music.
But I'am unable to create a link. When I use the Make Link command, it creates a broken link.
When I try to make a link within terminal, with
ln -s /home/your_user_name/mnt/link2music /home/your_user_name/.gvfs/public on 192.168.2.3/music/
it says Target 192.168.2.3/music/ is not a file or directory. It seems that the spaces are giving the trouble?
Then I tried
ln -s /home/your_user_name/mnt/link2music "/home/your_user_name/.gvfs/public on 192.168.2.3/music/"
it says Operation not supported.
Any suggetsions to get any further?

geirha
April 16th, 2010, 06:46 PM
ln -s "$HOME/.gvfs/public on 192.168.2.3/music/" "$HOME/mnt/link2music"

bobvanderputten
April 16th, 2010, 07:15 PM
THANKS!! That worked!!