|
From: Slava P. <sl...@je...> - 2003-05-30 18:15:02
|
On Fri, May 30, 2003 at 12:11:03PM -0500, Pete Prodoehl wrote:
>
> Well, it's not quite as compact, but this worked for me using Mac OS X:
>
> strCmd = new StringBuffer();
> strCmd.append("open -a /Applications/Mozilla/Mozilla.app ");
> strCmd.append('"');
> strCmd.append("http://www.php.net/");
> strCmd.append(textArea.getSelectedText());
> strCmd.append('"');
> runInSystemShell(view, strCmd.toString())
>
>
> Now if we could only control whether the console actually shows itself ;)
Since in this case you don't care about looking at standard output or
error parsing, etc it might be better to call the Java APIs directly:
proc = Runtime.getRuntime().exec("...");
proc.getInputStream().close();
proc.getOutputStream().close();
proc.getErrorStream().close();
--
Slava Pestov
|