Hello! I am writing a program that among other things, it copies and recieves files from remote computer, since I've failed to use the Jcraft, I am now resolved to use the Runtime class that (as I understand) I can use to write command lines to the shell , and with this , I can transfer the files I want(as I do through the shell - manually) does anyone have a simple code sample for writing to the shell ? or refference? or anything ? thanks, dave
You can use the various versions of Runtime.exec(). Basically, you give it either a single String forming your entire command or a String of the command with parameters, depending on your needs. You can also specify extra environment variables plus a current working directory.Check out the Process class to see how to capture its output and feed it input.
posted 13 years ago
thanks, I need some more info,but it seems to be what I'm looking for Dave
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database