title: java.io.IOException: Cannot run program "pwd.sh": error=13, Permission denied ... How do I get environment variables in Eclipse debug session?
body: <p>I have a weird problem while trying to execute a system process from within a Java program.  Getting permission denied error:<br>
  java.io.IOException: Cannot run program "pwd.sh": error=13, Permission denied</p>
  
  <p>Very similar to this:
  <a href="https://stackoverflow.com/questions/3085897/permission-denied-error-in-java">Permission denied error in Java for chmod command</a></p>
  
  <p>It is working for me on one machine and not another.  I have tried setting permissions to 777 on the pwd.sh file and no luck.  The problem does not occur when I start the java program as 'user1', but it does occur when I start as root with 'sudo -u user1 java ...'  (Which is what I ultimately need to do.)</p>
  
  <p>So, any ideas what is going on?  Is there a way in Eclipse to check my userid and present working directory before the program is called?</p>