Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Standard in must be a tty

807598Apr 27 2006 — edited Apr 28 2006
I was trying to use Runtime.getRuntime().exec() to run a very simple scirpt that only contains one line:
su $1

In my program, i was trying to feed in the password by :
PrintWriter pw = new PrintWriter(new OutputStreamWriter(p.getOutputStream()));
pw.println(password);
pw.flush();

and I am getting this error when I read from p.getErrorStream()

I do not have much experience with Linux and scripting. Any suggestions will be highly appreciated!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 26 2006
Added on Apr 27 2006
4 comments
624 views