• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

storing files at ftp server

 
Andrey Kuzmenko
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does somebody know how to store files at ftp server from javafx code ?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Andrey Kuzmenko
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, if the server does not speak HTTP, then FTP seems to be the only remaining option.
 
Andrey Kuzmenko
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you, i'll do so
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic