Hi,
i tried to run the program with following sample code.but i am not able to pass command line inputs.
sample code:
---------------------------
public static void main(
String args[]){
Runtime rr=Runtime.getRuntime();
try{
Process p=rr.exec("primer");BufferedReader br=new BufferedReader(new InputStreamReader(p.getInputStream()));
BufferedWriter or = new BufferedWriter(new OutputStreamWriter(p.getOutputStream()));
String l=new String();
while((l=br.readLine())!=null){
System.out.println(">>>"+l);
try{
or.write(4);
or.write('\n');
or.write('\r');
or.flush();
}catch(Exception e){
System.out.println("exception"+e);
}
}
System.out.flush();
}catch(Exception ioe){
System.out.println("Exception is:"+ioe);
}
}
}
---------------------------------
if i run the above sample code i am not able to see anything until i terminate the program.
please help me in this..if you have any sample code..that will help me in understanding how to do processing.
thanks in advance
karan