I'm writing a java app that will allow users to run existing perl scripts, stylesheets and some other utilities all from a gui instead of a command line.
I can run the perl script no problem:
but if the script has users enter data via <STDIN>, does anyone know how to capture that info in the java app? In other words, the call for STDIN would prompt a dialog box to open in the java app, which would in turn pass it to the perl script?
You communicate with the Process through the streams returned by getInputStream(), getErrorStream() and getOutputStream(), for regular output and error output from and input to the process respectively. To send data to the process' STDIN you must write to getOutputStream(). You can simply use JOptionPane or a custom dialog for letting the user enter the data, then write it to getOutputStream().
While you're at it, search for and read the Javaworld article "When Runtime.exec() won't".