Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

How can you read from a process?

  Asked By: Harley    Date: Jul 10    Category: Java    Views: 624

I want to be able to run an Win32 console application like this....

String[] cmd = {OracleHome + "\\sqlplus.exe", UserPass
+ "@samsdb,@..."};
Process p = Runtime.getRuntime().exec(cmd);

OutputStreamWriter sqlout = new OutputStreamWriter

BufferedWriter sqlread = new BufferedWriter(sqlout);
BufferedReader sqlprt = new BufferedReader(sqlread);

while ((sqlprt.readLine()) != null)
catch(IOException e)
I know the code is incorrect but I wanted to convey the idea.
Do console apps automatically have there STDOUT go to another console
Can I redirect it to a java GUI?
Should I just use JDBC behind the GUI to perform the PL/SQL?



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on How can you read from a process? Or get search suggestion and latest updates.