• Post Reply Bookmark Topic Watch Topic
  • New Topic

trying to execute shellscript in jsp code  RSS feed

 
Rajesh Kumaresan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to execute shell script in jsp code..
i get the code and executed it ..
but it throwing the error as


exception occured: Cannot run program "/opt/sonus/ems/pgm.sh": CreateProcess error=2, The system cannot find the file specified

but the path name of the file is correct ..
i am executing the code in netbeans ide with jboss server...



please help me to solve the problem
 
Mahender Parkipandla
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Please try giving escaping characters to "/" and check once.
 
Rajesh Kumaresan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
now i am getting the message as


exception occured: Cannot run program "/": CreateProcess error=5, Access is denied
 
Mahender Parkipandla
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might need permissions to run the script file.
Check the permissions available for the script file.
I assume it should have 777 permission to be executed by JVM.
 
Rajesh Kumaresan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya the permission i set is 777 ..

this is the permission of the file


-rwxrwxrwx.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!