Scripts containing Java Programs, vbs scripts and other executable files works fine while running from the command prompt but gives error while monitoring them from Applications Manager.

Scripts containing Java Programs, vbs scripts and other executable files works fine while running from the command prompt but gives error while monitoring them from Applications Manager.

Reason: Applications Manager on executing the script does not know the path for the java, cscript and other executable files.

Solution: To monitor the script, the path should be set within the script. If java is used inside the script,make sure that the class path is set for the java.

Add the below as the first line:

For Linux:
      export path=<path>

For Windows:
      set path=<path>


where <path> is the full path that you get when you type echo $path in Linux and echo %path% for Windows in the command prompt.