Okay, so I was kind of intersted in writing a little Cocoa-Java app that would be able to read and write to a tcsh session created by my program. Sounds easy enough. Here's what I have started:
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
Process p = Runtime.getRuntime().exec(<font color = red>"tcsh"</font>);
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
out = new BufferedWriter(new OutputStreamWriter(p.getOutputStream()));
</font>[/code]
That looks good to me (with all the appropriate imports and such). But when I try to call out.write(String), I can't seem to have anything done. Like, I see my tcsh session created while watching top, but if I out.write("top"), it never shows up as a new process in top. I've tried adding carriage returns and new lines to no avail. And when I try in.readLine() to see what's being printed out by tcsh, my app always locks up right there, as if the first line is infinetly long...
So, does anyone see the folly of my ways? Because I'm really confused.
Thanks,
F-bacher