could you please give some details about the shell program you are running it is possible that that program is not getting executed properly.
regards asif -----Original Message----- From: Jiri Chaloupka [mailto:[EMAIL PROTECTED]] Sent: Monday, January 27, 2003 2:54 PM To: [EMAIL PROTECTED] Subject: trouble with readin value from Runtime.exec(cmd) 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 =========================================================================== 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