Java Runtime.getRuntime().exec() problem - How to read an input file
807606Mar 7 2007 — edited Mar 8 2007i use "Runtime.exec()" to call qmail-inject on Linux, I have to pass the message
body to qmail inside java, how would I do it. I am
desperate since it won't read anything from
message.txt, it just won't read anything from "< message.txt"
It end up sending a blank email.
Process proc =
runtime.exec("/var/qmail/bin/qmail-inject
nwa001@somedomain.com < message.txt");
So how to pass a file to a executale inside exec? the "<" pipeline obviously not working!
Thanks ahead!