0

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?

2
  • well it all depends what you want to learn. If it's basics you're looking for then why not write it all yourself? A server that will accept connections and store/retrieve the files and a client for it? Dropbox has a Java API client dropbox.com/developers/documentation but the only thing you'll learn using it will be, well, dropbox Java API ;-) Commented Nov 15, 2013 at 14:47
  • Thx for your commment! I didn't new that there was dropbox API, i will have it in mind! Commented Nov 15, 2013 at 23:23

2 Answers 2

2

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

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

Sign up to request clarification or add additional context in comments.

Comments

0

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.

1 Comment

First of all thanks for your answer but I want to do it by java,not by using an FTP program!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.