• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.io.IOException: Cannot run program error=2, No such file or directory  RSS feed

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a java class in which I call a runshellscript method that will execute a script. It worked well with mysql but I cannot seem to find out why it wont work well with psql. Here is an excerpt of my runshell method:





the problem is that when i put this behind a mouse clicked event it says command not found. Here is the code beuind the mous event



The weird thing is that when I go directly to the directory where the script resides and type ./mysqlconnection the script works. But when i just type mysqlconnection is says command not found. Somehow it is not recognizing my script name as a command?
 
Paul Agola
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
further reports when i bring up my xterm and just type

/bin/csh -c vobs/tools/Scritps/DataValidation/mysqlconnection.csh it seems to work so why wont it work using the java runtime.exec method?

everything seems to work fine from command promp and this above is the string that i am passing in so i dont udnerstadnw hy it doesnt work
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!