try to user
Process p = Runtime.getRuntime().exec(cmd);
if (p != null)
{
p.waitFor();
}
this will cause the process to wait until you terminet the browser or
notepad
On 14 July, 19:39, Rajnish <
rajnis...@gmail.com> wrote:
> Both cmd are start run a process but not as backgroung process
> If I write something like:
>
> Runtime.getRuntime().exec("cmd /c notepad.exe");
>
> the Java console will not terminate. When I close the notepad then the
> java application terminates. (means not in background).
> Can Threads help in this regard
>
> There is similar post on nethttp://
www.java-forums.org/new-java/8043-how-run-exe-background.html
>
> Please reply if someone finds exact answer.
>
> On Jul 10, 4:53 pm, Sandeep Kadyan <
sandeep.kad...@gmail.com> wrote:
>
>
>
> > We can use
> > "start" command to start a process in a separate window.
>
> > Note: java program can be start in background by using javaw.exe instead of
> > java.exe
>
> > Sandeep Kadyan
> > e-M@il:
sandeep.kad...@gmail.com
> > Skype IM: sandeep.kadyan
> > YIM:
thekadi...@yahoo.com
> > Cell:-
+91 99116 14500
>
> > On Fri, Jul 10, 2009 at 5:02 PM, Manjeet Sharma <
sharma.manj...@gmail.com>wrote:
>
> > > Hi,
>
> > > I am trying to run a command on WINXP as a background process.
>
> > > i have tried , but it does not work e.g.
> > > cmd /c notepad.exe
>
> > > please tell me any solution for the same.
>
> > > Thanks
> > > --
> > > ----
> > > (Manjeet Sharma)
> > > Senior Software Engineer
> > > Lumenare Networks
> > > +9...
> > - Show quoted text -- Hide quoted text -