From owner-freebsd-java@FreeBSD.ORG Mon Aug 13 22:42:02 2007 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A51A816A419 for ; Mon, 13 Aug 2007 22:42:02 +0000 (UTC) (envelope-from ronald-freebsd8@klop.yi.org) Received: from smtp-out2.tiscali.nl (smtp-out2.tiscali.nl [195.241.79.177]) by mx1.freebsd.org (Postfix) with ESMTP id 6AFCB13C45D for ; Mon, 13 Aug 2007 22:42:02 +0000 (UTC) (envelope-from ronald-freebsd8@klop.yi.org) Received: from [82.171.39.195] (helo=guido.klop.ws) by smtp-out2.tiscali.nl with smtp (Tiscali http://www.tiscali.nl) id 1IKibp-0006BH-5K for ; Tue, 14 Aug 2007 00:42:01 +0200 Received: (qmail 1419 invoked from network); 13 Aug 2007 22:41:55 -0000 Received: from localhost (HELO guido.klop.ws) (127.0.0.1) by localhost with SMTP; 13 Aug 2007 22:41:55 -0000 Date: Tue, 14 Aug 2007 00:41:54 +0200 To: freebsd-java@freebsd.org From: "Ronald Klop" Content-Type: text/plain; format=flowed; delsp=yes; charset=us-ascii MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable Message-ID: User-Agent: Opera Mail/9.22 (FreeBSD) Subject: jdk1.6: Runtime.exec fails always X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Aug 2007 22:42:02 -0000 When I run this programm, I always get exitCode =3D=3D 255. $ java -version java version "1.6.0_01-p1" Java(TM) SE Runtime Environment (build = 1.6.0_01-p1-root_12_aug_2007_22_50-b00) Java HotSpot(TM) Client VM (build 1.6.0_01-p1-root_12_aug_2007_22_50-b00= , = mixed mode) $ uname -a FreeBSD ronald.office.base.nl 6.2-STABLE FreeBSD 6.2-STABLE #74: Sat Jul= = 14 13:11:40 CEST 2007 = root@ronald.office.base.nl:/usr/obj/usr/src/sys/RONALD i386 I found it with other code, but this is my small testcase to reproduce i= t. Can people reproduce this? Ronald. import java.io.IOException; final class ExecTest { public static void main(String[] args) throws IOException, = InterruptedException { Runtime rt =3D Runtime.getRuntime(); Process p =3D rt.exec("/bin/ls"); int exitCode =3D p.waitFor(); System.out.println("ExitCode: " + exitCode); } } -- = Ronald Klop Amsterdam, The Netherlands