0

I have a Java app that queries a file database. Depending on the query, I get a set of results (files) ranked in a certain order. I got this to work locally, and the user can open those files by double-clicking on the results, one by one. Now, I am moving everything to an external server, and I have the Java program query the database on the server. I get the same results back. Now, the files are also stored on the server, they are not local, so, when the user double-clicks, I need to do some secure ftp (or something similar, I can take suggestions) to copy the file and open it locally (and, if desired, save it). This is the problem, I have no idea where to start, is there a good Java library I should use, look at, in order to accomplish this? Username and password for the ftp can be hard-coded if necessary, should this make things any easier (though it's probably the same). FYI the files are mostly pdf, html, word or text, not binary. Thanks!

user
  • 1,865
  • 4
  • 20
  • 36

2 Answers2

1

Not sure about your business requirements and constraints, but you can look at the Dropbox API for Java. This could be either a slick suggestion or a terrible one depending on your needs.

vphilipnyc
  • 7,433
  • 7
  • 51
  • 75
1

As @MadProgrammer suggested JSch

Refer to following post already answering your concern :

java-what-is-the-best-way-to-sftp-a-file-from-a-server

Community
  • 1
  • 1