You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Suresh Krishna M (RBIN/DBA-JOT)" <Su...@in.bosch.com> on 2001/06/28 05:17:35 UTC

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




Re: Urgent please respond

Posted by pete <pe...@claudia.dyn.dhs.org>.
Why not run an Perl or other CGI-type program to execute your batch 
file, and invoke it remotely. (ASP, AFAIK, lacks the 'exec' command or 
similar)?

You could do this equally well with servlets or most other web 
languages. Remeber to password-protect these scripts though.

-Pete

> I cant see what this has to do with Tomcat, but essentially what you're 
> asking for is RMI of a batch file.  If you want to give me some details of 
> what it is you're trying to do I'm happy to try and help, but I'd suggest 
> taking it offline as it is not related to this list.
> 
> cheers
> dim
> 
> On Thu, 28 Jun 2001 13:17, you wrote:
> 
>> 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
> 



Re: Urgent please respond

Posted by Dmitri Colebatch <di...@nuix.com.au>.
I cant see what this has to do with Tomcat, but essentially what you're 
asking for is RMI of a batch file.  If you want to give me some details of 
what it is you're trying to do I'm happy to try and help, but I'd suggest 
taking it offline as it is not related to this list.

cheers
dim

On Thu, 28 Jun 2001 13:17, you wrote:
> 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