Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <2F5BD88EB480D3119E35009027AF99B50174A13D@xpa03.corp.hp.com> From: "SAWANT,SACHIN (Non-HP-PaloAlto,ex1)" To: "'cygwin AT cygwin DOT com'" Subject: Java Runtime.exec() Date: Mon, 9 Jul 2001 18:03:02 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Hi, We are using cygwin to run our application. I am trying to execute a shell file at the operation system through java. The code is as follows String unixCommand = "./run.sh"; Runtime rt = Runtime.getRuntime(); Process proc = rt.exec("unixCommand"); InputStream result = proc.getInputStream(); InputStreamReader isr = new InputStreamReader(result); BufferedReader br = new BufferedReader(isr); String line = null; while ( (line = br.readLine()) != null) out.println(line); int exitVal = proc.waitFor(); I am getting CreateProcess Exception when I try to run this code. It does work well for other unix commands like "ls" or "ps". Am I doing something wrong? Regards Sachin -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/