Hello, everyone. I would like to know how to connect to and gain access to a shared network folder. I presume I need a login for that share folder. Can a URL construct be used?
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Hello, everyone. I would like to know how to connect to and gain access to a shared network folder. I presume I need a login for that share folder. Can a URL construct be used?
Use whatever the address of the file is (in general it's //{computer address}/{rest of address})
So, for example, to access a computer with an ip address of 192.168.0.4 inside a folder called share:
If you can access the other computer via the name, you can just use the name instead of the IP address.
Lastly, you can access via the url as well.
Thanks for your speedy response. What I did already is exactly what you (or anyone else) probably would have suggested. My real problem is: creating the file object from the actual path works. However, what if the share folder needs authentication, which is the case with most Windows machine.
Before I go any further. I probably should ask for suggests to the best possible route to achieve the follwoing:
1. I want to get a file name externally ( the name of an image file, .jpg)
The file names are within Oracle database. This part is fairly easy.
2. Search a remote folder ( the share folder on the LAN that contains all the image files; the share folder requires authentication.
3. Return the image file when found.
The found image file will be used in a HTML context. I am not sure how to implement this.
Im thinking about just returning the absolute path to the image file when it is found, this path will be embedded in the img tag. As I said I am not sure how to proceed. SUGGESTIONS PLEASE.
Would an applet carry out this function?