Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFileChooser

 
rama krishnan
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to find the server side Particular directory and files using JFileChooser
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't - JFileChooser is for navigating file systems available to the computer the Swing application is running on. The only way to navigate directories "on a server" would be to make the server's file system shared and map it on the client.
 
rama krishnan
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Nate
 
Yves Zoundi
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Have a look at java.io packages and/or Apache Commons IO Library.
 
rama krishnan
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way to do this task without using Tomcat & servlet
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are other ways of accessing a file system on a server - FTP or shared directories come to mind.
 
rama krishnan
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to do using the FTP
 
Maneesh Godbole
Saloon Keeper
Posts: 11092
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by muthurama krishnan:
how to do using the FTP


http://faq.javaranch.com/java/ShowSomeEffort
http://www.google.com

Did you take a look at the JFileChooser API? Have you seen how the JFileChooser dialog looks? On Windows, did you notice the "My Network Places" Icon on the left hand side? What do you think will happen if you click on it? Do you think you can navigate to the server from here and inspect the shared directories from here?
 
Yves Zoundi
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're looking for a JFileChooser which supports remote files access(FTP, WEBDAV, etc.), you could give a try to VFSJFileChooser.
 
Rob Spoor
Sheriff
Pie
Posts: 20606
60
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Heh. If it wasn't so relevant to the problem I'd say that post was more appropriate for Blatant Advertising
 
aditya parikh
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Question for the VFSJFileChooser. I am running an FTP (FileZilla) server. I created an alias /fileimport directory with a file in it.
I am able to connect to the server using FileZilla client okay. I specify localhost:21 and my username password to the VFSJFileChooser connections, it connects okay but no files are displayed. What should I be doing?

Thanks in advance.
 
aditya parikh
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I downloaded http://www.softpedia.com/progDownload/VFSJFileChooser-Download-93276.html and seems to work.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic