There is no way to start the execution of a batch file on one
machine and have it run in the context of another.  Microsoft does have
several solutions to this.  You probably want to look into their RConsole
(part of the NT Resource Kit).  A different approach might be to set up IIS
on the other machines and then install one of the freeware ASP service
restarters.  From Tomcat you would then call the URL (using something like
URLConnection) to achieve your service restarter.

        Of course, you could create your own communication mechanism
(perhaps using RMI, like someone suggested).

        Randy

> -----Original Message-----
> From: Suresh Krishna M (RBIN/DBA-JOT) [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 27, 2001 11:18 PM
> To: [EMAIL PROTECTED]
> Subject: Urgent please respond
> 
> 
> Hello ALL,
>           I have a problem regarding the Runtime.getRuntime().exec().
>           I am trying to run a .bat file in a separate 
> machine(the batch
> file is in a separate machine in the same domain and i mapped 
> the machine
> with the batch file folder as T:\\).but when i use this
> Runtime.getRuntime().exec("t:\\xxx.bat" ); The commands in 
> the batch file
> are running in my machine.But i dont wan't this.I want to run 
> the batch file
> in the machine where it is.
>           Or is there any way on WINNT that my java program sitting on
> machine A will be able to stop a specified process on the 
> machine B/machine
> C.It is understood that machine A's user will have the 
> administrative powers
> on Machine B,C.
> 
>           Please Help me...
> 
> Thanx in advance
> 
> 
> 

Reply via email to