title: Jython - javaos.getenv() gives "Failed to get environment, environ will be empty"
body: <p>Whenever I run any jython program in Eclipse, I got the following error in the beginning of the output: </p>
  
  <blockquote>
    <p>" Failed to
    get environment, environ will be
    empty: (0, 'Failed to execute command
    ([\'sh\', \'-c\', \'env\']):
    java.io.IOException: Cannot run
    program "sh": Crea teProcess error=2,
    The system cannot find the file
    specified')</p>
  </blockquote>
  
  <p>First, my environment is:</p>
  
  <p>Windows 2008</p>
  
  <p>JDK 1.6.0u10</p>
  
  <p>jython 2.2.1</p>
  
  <p>I did some digging, and I realized that this message is produced in the function javaos.getenv(). 
  Whenever I call the javaos.getenv() function, it throws the following error:</p>
  
  <p>C:\jython2.2.1>java -jar jython.jar</p>
  
  <blockquote>
    <blockquote>
      <blockquote>
        <p>import javaos</p>
        
        <p>print javaos.getenv("user.name")</p>
      </blockquote>
    </blockquote>
    
    <p>Failed to get environment, environ
    will be empty: (0, 'Failed to execute
    command ([\'sh\', \'-c\', \'env\']):
    java.io.IOException: Cannot run
    program "sh": Crea teProcess error=2,
    The system cannot find the file
    specified')</p>
  </blockquote>
  
  <p>This is strange, because I'm currently using a Windows machine, not an Unix.</p>