Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2006

Tip: Looking for answers? Try searching our database.

Call runtime.exec(), but not as a child process?

Thread view: 
BigCohunes@gmail.com - 07 Sep 2006 17:53 GMT
Can someone show me how I would go about having a java program launch a
different program, but not as a child process?

For example, I would like my java program to launch "calc.exe".  I then
want my java program to be able to finish its processing and end.  I
don't want the java program to have to wait for the calc.exe process to
be finished also.

Any idea's?

Thanks
Knute Johnson - 07 Sep 2006 18:06 GMT
> Can someone show me how I would go about having a java program launch a
> different program, but not as a child process?
[quoted text clipped - 7 lines]
>
> Thanks

Then don't wait for it.  It should work fine as long as there isn't any
console I/O in your execed program.

Signature

Knute Johnson
email s/nospam/knute/

BigCohunes@gmail.com - 07 Sep 2006 18:30 GMT
> Then don't wait for it.  It should work fine as long as there isn't any
> console I/O in your execed program.
[quoted text clipped - 3 lines]
> Knute Johnson
> email s/nospam/knute/

Thanks!

My problem turned out to be that I was running it in a IDE (IntelliJ).
It seems that IntelliJ did not consider the java program was finished
until the child process was exited also.

However when I ran from command line it worked as expected.

Thanks again


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.