Freddy Wong wrote:Why not do something like this:
In Linux:
In Windows:
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Steve
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Vivek Jain wrote:Any other idea?
Steve
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Vivek Jain wrote:I gave debuging output everywhere
Steve
it appeared no STDIN was created and not lines were appended to the file. When I add the perl executable as part of the command it worked fine.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Moojid Hamid wrote:Steve I have been called lots of names but never Majood, I ended up googling it
![]()
it appeared no STDIN was created and not lines were appended to the file. When I add the perl executable as part of the command it worked fine.
IMO the Java part of the stream does not write to the output stream until you flush or close it, stream has to be closed to send EOF and terminate the Perl script, otherwise it hangs waiting for input and Java hangs on process.waitFor() since the Perl is hung. The fact that the script partially runs even without passing the string "perl" suggests that is not the cause of problem.
Steve
Fire me boy! Cool, soothing, shameless self promotion:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
|