• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Push/Grab archive file from server

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Nitesh.

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

 
reply
    Bookmark Topic Watch Topic
  • New Topic