Hi there, I hope I'm in the right forum. I'm having trouble executing a unix script from a
java program. The script receives multiple parameters and it seems that one of them ( or more ) is not well interpreted. When I run the script directly from a shell, the script executes without any errors. But, when I run the exact same script with the exact same parameters, it does not work.
Here is the command to execute the script with all the parameters that is executed from the shell ( with success ) and also from the java program ( with errors ):
/z/opus/dcap/intfu001.csh 'NODEBUG^NOTKPROF^NOSTACK' opus dcap JACQUES JACQUES '2625781' 'ORA$PIPE$001D00D70001' JOB^DEBUG^SINISIMU^STATPROD^DECTIDANC^81^503^4080^86^87^151^97^98^99 BUT^N^N^SPRI^0^13^24^3^J^05^N^19^19^19 >> /tmp/switcher8.999.null.pgm.test
And here is my portion of code that executes the script:
...
Runtime wShell = Runtime.getRuntime();
Process wProc = wShell.exec(cmd_unix_final);
wProc.waitFor();
return wProc.exitValue();
}
Please give me your thoughts on this!
Thanks in advance!