What type of program is it?
The code you are using should work fine with any command-line
program, (like command.com or dos editors etc..)
If the program needs a bit of time before it accepts input
you might want to do prod the program a few times with:
in.println("input");
If it's a windows application you might find yourself with a bit of trouble,
as you may need to use OLE to access whats on the screen. A bit messy.
Dave
-----Original Message-----
From: Mehmet Gok [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 03, 2000 3:56 PM
To: [EMAIL PROTECTED]
Subject: Runtime problem
hi
In a servlet I'm using Runtime object to run a a program in my system..
I use such a thing:
Process p=Runtime.getRuntime().exec("prog_name");
But this program takes input from user
so i send it like this:
PrintStream in= new PrintStream(p.getOutputStream());
in.println("input");
So what is wrong with this code?
Program can not get input from the servlet.
thanx
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
