Reputation: 1459
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?
Upvotes: 0
Views: 466
Reputation:
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.
Upvotes: 0
Reputation: 15696
FTP (File Transfer Protocol) might be the simplest solution.
One of many FTP APIs in Java: Apache Commons-Net FTPClient
Upvotes: 2