I want to be able to run an Win32 console application like this....
String[] cmd = {OracleHome + "\\sqlplus.exe", UserPass
+ "@samsdb,@..."};
try
{
Process p = Runtime.getRuntime().exec(cmd);
OutputStreamWriter sqlout = new OutputStreamWriter
(p.getOutputStream());
BufferedWriter sqlread = new BufferedWriter(sqlout);
BufferedReader sqlprt = new BufferedReader(sqlread);
while ((sqlprt.readLine()) != null)
{
text.append(sqlplsout);
}
}
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
window?
Can I redirect it to a java GUI?
Should I just use JDBC behind the GUI to perform the PL/SQL?