0

I create a custom mediator in apache synapse to invoke some system command such as java -jar, execute shell script, etc.. But i have no luck to this, i tried these codes :

Process process =runtime.exec("touch /opt/FILE.txt");

and

Process p = runtime.exec(new String[]{"java","-jar","/opt/MyMediator.jar"});

both of them were runnable when i create the jar and run the jar manually, but when i deploy it to the synapse lib, it wont work. So can anybody tell me how to do this properly?

Thanks,

Community
  • 1
  • 1
Mari_Yaguchi
  • 477
  • 8
  • 25

0 Answers0