Re: Runtime.exec()
Jeff Kesselman <[email protected]>
| Newsgroups | gmane.comp.windows.devel.java.advanced |
|---|---|
| Message-ID | <[email protected]> |
Francis Chong wrote: > A long story, this may help: > http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html > Short story, Dont use exec(String cmd) if you have any command line flags. It never ends up parsing right. use exec(String[] tokens) and put each token in a separate element in the array. JK > -----Original Message----- > From: Discussion of advanced Java topics. > [mailto:[email protected]] On Behalf Of Avinash Lakshman > Sent: Thursday, September 20, 2007 9:17 AM > To: [email protected] > Subject: [ADVANCED-JAVA] Runtime.exec() > > Hi All > > I am noticing this weird behavior with Runtime.exec() and was wondering > could help me understanding this better. Basically I run > Runtime.getRuntime().exec("scp -r <source> <target>"). This never performs > the scp. However if I copy this into a .sh file and execute the .sh file > then scp does happen. What is going on? Is there a way to execute the > command directly? Does it have anything to do with any permission settings? > > Thanks > A > > _________________________________________________________________ > Capture your memories in an online journal! > http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us > =================================== > This list is hosted by DevelopMentorR http://www.develop.com > > View archives and manage your subscription(s) at http://discuss.develop.com > > =================================== > This list is hosted by DevelopMentor® http://www.develop.com > > View archives and manage your subscription(s) at http://discuss.develop.com > =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com