Hallo, I have shell program, which I must call and read its output. On the console it print some output to console and has some *return value*. This return value I must read back to java:
The part of code is: **************************** String ress = "---"; Process p = null; try{ Runtime r = Runtime.getRuntime(); p = r.exec("cd /usr/local/cai; ./inocucmd -SEC -NEX /tmp/file.pif; echo $?"); BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream())); while (in.readLine() != null) { ress = "<br>"+in.readLine(); } in.close(); }catch(Exception et){ out.println("Fail: "+et.toString()); } out.println("<br>result is: "+ress+"<br>"); *************************************************************** but there is no value ... (in.readLine() conatins null) Is there anything what I not comprehed good? or where can be way? Thanks Jiri =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com