In my swing app , i want to access files from network. From FileChooser we can access file from our local disk, similarly is there any way can we access the file if we provide the URL. Iam a beginner in this filed, any help is highly appreciable.
Asked
Active
Viewed 304 times
-1
-
1file chooser can access network files as well. You can either type the path or map network drives to the local machine and access through them – Thusitha Thilina Dayaratne Aug 26 '14 at 11:07
-
When i tried with a path , "open" is not showing. Can you please give a small example – user3914237 Aug 26 '14 at 11:13
1 Answers
0
You don't have to do any configurations in JFileChooser
to select network stuffs. By default JFileChooser
can access network files as well. You can either type the path or map network drives to the local machine and access through them. Or use network node in the computer in the JFileChooser
and select the stuff that you want.

Thusitha Thilina Dayaratne
- 5,666
- 4
- 42
- 69
-
But when i provide a path in the address bar of FileChooser popup, the "open" is not highlighting. Only in my local directory the "open" gets highlighted. – user3914237 Aug 26 '14 at 11:16
-
Put your code in the post. Did you can access that file using explorer? – Thusitha Thilina Dayaratne Aug 26 '14 at 11:17
-
ok... Is it possible to checkout the file if we are accessing from a Subversion , where we can only checkout the file using SVN like tortoisesvn. – user3914237 Aug 26 '14 at 11:25
-
what is the connection between svn and access files through the JFileChooser? What you really want to do? – Thusitha Thilina Dayaratne Aug 26 '14 at 11:28
-
If you have permission then you can checkout files from SVN using tortoise svn without any issues. – Thusitha Thilina Dayaratne Aug 26 '14 at 11:29
-
When i tried with the path, it says the file ( file path from svn ) doesnt exist. [ Sorry , if iam changing the topic to SVN. ] – user3914237 Aug 26 '14 at 11:41
-
-
Access the file from my svn to open it through the filechooser. I am trying to open it through : " java.awt.Desktop.getDesktop().open(new File(temp)); " – user3914237 Aug 26 '14 at 11:44
-
SVN is a repository. Why do you want to access SVN through JFileChooser? Use some svn tools and checkout files using that. – Thusitha Thilina Dayaratne Aug 26 '14 at 11:46
-
OK.. Is it possible for carrying repository operations to be done through Java. – user3914237 Aug 26 '14 at 11:49
-
Yes you can. You can read http://stackoverflow.com/questions/8165014/how-to-access-files-in-svn-using-java – Thusitha Thilina Dayaratne Aug 26 '14 at 12:08
-
Glad to help you. Try your best to describe what you are trying to do in the question clearly. Your question didn't have a single word telling that you want to access svn through Java. It is very misleading. So next time make sure to put question more clearly. Upvote or mark as answer if any answer helped you. – Thusitha Thilina Dayaratne Aug 26 '14 at 12:37