From owner-freebsd-hackers Wed Mar 5 21:16:18 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id VAA12599 for hackers-outgoing; Wed, 5 Mar 1997 21:16:18 -0800 (PST) Received: from rocky.mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id VAA12591 for ; Wed, 5 Mar 1997 21:16:15 -0800 (PST) Received: (from nate@localhost) by rocky.mt.sri.com (8.7.5/8.7.3) id WAA11418; Wed, 5 Mar 1997 22:16:06 -0700 (MST) Date: Wed, 5 Mar 1997 22:16:06 -0700 (MST) Message-Id: <199703060516.WAA11418@rocky.mt.sri.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: John Fieber Cc: Nate Williams , freebsd-hackers@freebsd.org Subject: Re: Java awt support? In-Reply-To: References: <199703060154.SAA10410@rocky.mt.sri.com> Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > I know of at least 2 bugs in it. > > > > - You can't use call system executables from it (it blows chunks and > > leaves the process you called running in the netherlands). > > Really? Could you send a snippet of code that exercises this? Sure, here you go. Replace the command with anything you feel like. Nate -------------- import java.io.*; public class Exec { public static void main(String[] argv) { String cmd = "/sbin/ping www.symantec.com"; try { Process process = Runtime.getRuntime().exec(cmd); String line; DataInputStream dis = new DataInputStream(process.getInputStream()); while ((line = dis.readLine()) != null) { System.out.println(line); } System.out.println("Exit value was: " + process.exitValue()); } catch(IOException ioe) { System.err.println(ioe + " IO Error executing command: " + cmd); } } }