jQuery in Action, 2nd edition*
The moose likes JavaFX and the fly likes storing files at ftp server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JavaFX
Bookmark "storing files at ftp server" Watch "storing files at ftp server" New topic
Author

storing files at ftp server

Andrey Kuzmenko
Greenhorn

Joined: Mar 23, 2010
Posts: 6
does somebody know how to store files at ftp server from javafx code ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41134
    
  45
I thought it was possible to use arbitrary Java libraries from within JavaFX code, like Apache Commons Net (which contains an FTP client); not so?


Ping & DNS - my free Android networking tools app
Andrey Kuzmenko
Greenhorn

Joined: Mar 23, 2010
Posts: 6
Ulf Dittmer wrote:I thought it was possible to use arbitrary Java libraries from within JavaFX code, like Apache Commons Net (which contains an FTP client); not so?


The problem is that application must be run at client's computer. He has java without any additional libraries. Or may be the only way(if there is no such standard library) is to write application that will download such library?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41134
    
  45
The client must somehow download the application jar file anyway, mustn't it? Why not bundle the all required classes with it, either as a separate jar file, or as part of the application jar file?
Andrey Kuzmenko
Greenhorn

Joined: Mar 23, 2010
Posts: 6
i put my_game.html and my_game.jar on the server and call it with
swt.browser.getUrl("server adress/ my game.html") from client's java code. My game has to return value and i didn't find the way to do this. So i thought that it can save result on the server, and i will take result from client's code. I understand that such solution is ugly, but i don't know another. Are you sure, that in my solution i can put ftp library to my_game.jar ? Or may be you can help me to find another solution for this problem?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41134
    
  45
I don't fully understand what you're trying to do, but nothing stops you from making the Commons Net library part of the game's jar file.

Since you just want to return a "value" -and not an actual file- have you considered making an HTTP call from the application to a server URL?
Andrey Kuzmenko
Greenhorn

Joined: Mar 23, 2010
Posts: 6
But server doesn't run any code.. How can it reply? (may be i don't understand smth, but i can build such interaction only in the case, that server runs java code)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41134
    
  45
Well, if the server does not speak HTTP, then FTP seems to be the only remaining option.
Andrey Kuzmenko
Greenhorn

Joined: Mar 23, 2010
Posts: 6
thank you, i'll do so
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: storing files at ftp server
 
Similar Threads
FTP server
Configure FTP server
Transferring files frm one machine to another
serving pdf files
Commons Net Ftp how to perform checksum on file in the server