Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #12770

Re: How to call an external script/prgm and wait until execution is finished?

Date 2012-03-08 11:26 -0500
From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: How to call an external script/prgm and wait until execution is finished?
References <4f58dc33$0$6578$9b4e6d93@newsspool3.arcor-online.net>
Message-ID <4f58ddba$0$289$14726298@news.sunsite.dk> (permalink)
Organization SunSITE.dk - Supporting Open source

Show all headers | View raw


On 3/8/2012 11:20 AM, Sven Fischer wrote:
> I want to call from inside a java program an external script (resp. prgm) and wait
> until the execution is finished (successfuly or not).
>
> How can I do this?
>
> For simplicity assume the external script is either an DOS batch scipt (Windows) or shell script (Linux).
>
> How can I ask from inside the Java program for the return/exit code?

http://docs.oracle.com/javase/6/docs/api/java/lang/Process.html#waitFor%28%29

http://docs.oracle.com/javase/6/docs/api/java/lang/Process.html#exitValue%28%29

Arne

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

How to call an external script/prgm and wait until execution is finished? Svenfischer2@email.com (Sven Fischer) - 2012-03-08 16:20 +0000
  Re: How to call an external script/prgm and wait until execution is finished? Arne Vajhøj <arne@vajhoej.dk> - 2012-03-08 11:26 -0500
  Re: How to call an external script/prgm and wait until execution is finished? Roedy Green <see_website@mindprod.com.invalid> - 2012-03-08 16:59 -0800

csiph-web