Hi,

the caller of Runtime.exec() needs to consume the output of the started process.
So in general I'd recommend to use os.system(), which IMHO handles this for you.
Of course you still have to deal with the syntax details of the platforms.

Best wishes,
Oti.

On 7/1/07, astigmatik@gmail.com <astigmatik@gmail.com > wrote:
It was just an example. I'll get the value of 'browser' from users' preference.

On 7/1/07, Frank Wierzbicki <fwierzbicki@gmail.com> wrote:
> On 6/30/07, astigmatik@gmail.com < astigmatik@gmail.com> wrote:
> > I ended up with a Javanese solution:
> >
> > browser = r'c:\program files\mozilla firefox\firefox.exe'
> > from java.lang import Runtime
> > Runtime.getRuntime().exec((browser, url))
> >
> > Question is, would this work on non-Windows platforms?
> It would work in principle, but you would need to use a platform
> specific path and executable name (for example, on linux it would look
> something like:
>
> browser = r'/usr/lib/firefox'
> from java.lang import Runtime
> Runtime.getRuntime().exec((browser, url))
>
> and on OS X you could probably achieve a similar effect like so:
>
> browser = r'/usr/bin/open'
> from java.lang import Runtime
> Runtime.getRuntime().exec((browser, url))
>
> although in the OS X case this would open whatever OS X would think of
> as the appropriate app for the particular resource pointed to with
> url.
>
> -Frank
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users