I have a jar (that I can't change) that I would like to call after a successful file transfer in IBM MQ File Transfer Edition (FTE). I'm using MQ FTE 7.0.4. I've set commandPath
in agent.properties
to include the path to the java executable and the path to the jar I want to run. The most common error I get is:
The agent's command path '/opt/IBM/WMQFTE/jre/bin:/path/to/jar/postTask.jar' does not define a path to this command. Only commands whose path is on the agent's command path can be run.
When I set the post transfer command to be: /opt/IBM/WMQFTE/jre/bin/java
with no parameters, I get no errors other than the java executable complaining that it didn't get any parameters. When I run: /opt/IBM/WMQFTE/jre/bin/java -jar /path/to/jar/postTask.jar ${FilePath}
, I get an error like the one above.
Why is it that I can run/call Java all by itself but when I attempt to include parameters, it fails?
Things I haven't tried yet: 1) writing a small batch script that executes the java call that I want. 2) Opening a PMR with IBM.
Other research:
This very helpful question explained the difference between Calls and Exits. Exits require implementing the MonitorExit
interface which I can't do in my case.
This question may also belong on Super User; I'm not sure.