• Post Reply Bookmark Topic Watch Topic
  • New Topic

Push/Grab archive file from server

 
Adrian Lee
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone. I'm curious as to how I can program a pushing/grabbing of file. My requirements for the program is as followed:

1) Upon running of Java program, It will initiate a file transfer.
2) There will be no prompting to user on where to download the file to or requires the user to key in anything(eg.Enter).
3) Grab file from server(transfer started).
4) Downloaded file will be download to a given path/destination in the program.

I've managed to find a client-server socket program from an archive forum, which is close to something that I've wanted. However, this program requires the client to press enter to initiate the file transfer. Is there any ways that I can remove keypress "Enter"?





I've went through a number of websites and forums, but can't seem to find any solution on this.

Would be grateful if anyone can tell me what I can do or direct me on how to solve this.

Many thanks!
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The above line waits for a user input, since inFromUser wraps System.in
Remove this line and your program will run like crazy without your intervention
 
Adrian Lee
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nitesh.

LoL.. Didn't know that it's so simple. Thanks a lot~!!

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!