Skip to Content
0
Feb 05, 2009 at 02:25 PM

Run remote batch file from Web Application Server

136 Views

Hello,

I've developyed a Java program and deployed it on WAS v7.1.

My java program tries to run a remote batch file which is located on remote Windows file system (and not on the WAS file system itself).

The batch file was launched on the remote server (I saw it on the Task Manager of the remote server), but the remote batch file actually wasn't run (it was stuck).

In order to run the remote batch file from my java program that is deployed on the WAS I've created a batch file on the WAS file system which its contnet is:

cd c:\jobs

psexec.exe
iltlvt40 -u SAPServiceCE1 -p a2i2000! c:\automation\DiskSpace\runDiskSpace.bat

My java program calls this batch file using the Runtime.exec() java method in order to run the remote batch file.

Please guide me how to solve this problem?

Best regards,

Ahmad