Hi all,
First of all, I must thank you : I have asked 5 questions in this forum, and
each time I had a good answer that really helped me. So thank you!
My new question :
I want to launch an external program from my application (currently under
Windows, but I want it to work as well on a Mac and Linux). I have the
pathname to the application (as a File object). But I can't find the method
to actually launch the application. I have searched in the system object,
and the file object. No success.
Can anyone tell me how to do this?
Thanks in advance.
Francois
Andreas Wollschlaeger - 30 Apr 2007 09:25 GMT
> Hi all,
>
[quoted text clipped - 12 lines]
>
> Francois
Hi Francois,
have a look at the various exec() methods in java.lang.Runtime, this is
perhaps what you are looking for.
But beware that their use is somewhat tricky, as you have to consume the
process' output, else it may block when some internal buffer is full.
I can send you some helper class for Runtime.exec(), just send me a
short email to /d/5/0/3/@/d/i/r/e/c/t/b/o/x/./c/o/m , without the
slashes, of course :-)
Cheers
Andreas
Francois Lionet - 30 Apr 2007 16:17 GMT
>> I want to launch an external program from my application (currently under
>> Can anyone tell me how to do this?
> have a look at the various exec() methods in java.lang.Runtime, this is
> perhaps what you are looking for.
> Cheers
> Andreas
Thanks Andreas, this was exactly what I was looking for. Does anyone know an
address where I can download the Java SE Platform 6 docs all at once? I'd
rather have the docs on my machine, and I could not find a link on the Sun
site...
Francois
Eric Sosman - 30 Apr 2007 16:31 GMT
Francois Lionet wrote On 04/30/07 11:17,:
>>>I want to launch an external program from my application (currently under
>>>Can anyone tell me how to do this?
[quoted text clipped - 8 lines]
> rather have the docs on my machine, and I could not find a link on the Sun
> site...
http://java.sun.com/javase/downloads/index.jsp

Signature
Eric.Sosman@sun.com
Robert Mark Bram - 01 May 2007 01:39 GMT
Hi Francois,
One thought about this aspect.
> but I want it to work as well on a Mac and Linux). I have the
> pathname to the application (as a File object). But I can't find the method
The path (and even name) of your command might be different in the
different environments. It would be worth while to externalize the
definition of your command into a database or properties file that can
be changed for each environment.
Rob
:)