title: JAVA_HOME is not defined correctly (only from jenkins)
body: <p>Trying to setup jenkins but my builds fails with:</p>
  
  <pre><code>$ ant test
  Error: JAVA_HOME is not defined correctly.
    We cannot execute /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
  Build step 'Invoke Ant' marked build as failure
  </code></pre>
  
  <p>If I manually run "ant test" on the machine it works just fine and the JAVA_HOME is set to the exact same value. Any idea why it fails when jenkins try to run it ? Are there any more environment variabled involved ( I could not see any though ) ?</p>