Krishnam Ch wrote:I Am trying to execute shell script from java code through application URL/Servlet but it always returns code 127.
If same code executed directly by writing simple java class or calling directly /tomcat/UpdatePrice.sh in Linux is working fine.
127 is usually returned by the shell when a command executed by it is not found directly, or in any of the paths defined by PATH system environment variable; and since '
/tomcat' isn't a normal directory (
/usr/tomcat or
/[s]bin/tomcat is more normal) I suspect it might be that.
Winston