简体   繁体   中英

Java Remote Access to a file

for just educational reasons I want to access a remote file from java. To be more specific I want to upload somewhere a file at a remote pc and then make a program in java where I open it and read its content.Is dropbox a good option? Can this be achieved programmaticaly ? My main question is is there any free server or something like this where I can upload the file?

FTP (File Transfer Protocol) might be the simplest solution.

One of many FTP APIs in Java: Apache Commons-Net FTPClient

It is very difficult to code an FTP in Java, i would suggest FTPing it using FileZilla. You will need to have an open Server in the remote PC (configured to FTP, port 21/22) and from there you can enter the remote PC's IP address and open port into FileZilla (after the server is configured). From there you can just drag and drop the file. Let me know if this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM