title: error=2, No such file or directory at java.lang.ProcessBuilder.start
body: <p>I'm using Fedora 18 and JDK 1.7.13 installed in <code>/usr/java</code>. All executable files under <code>bin</code> folder have <code>-rwxr-xr-x</code> permission.
  I set both <code>ANT_HOME</code> and <code>JAVA_HOME</code> in my <code>~/.bashrc</code> as:</p>
  
  <pre><code>export ANT_HOME=/home/m/application/apache-ant-1.8.2
  export JAVA_HOME=/usr/java/jdk1.7.0_13/
  </code></pre>
  
  <p>and I have a <code>build.xml</code> file which says:</p>
  
  <pre><code>&lt;exec dir="${java.home}/bin/" executable="keytool"/&gt;
  </code></pre>
  
  <p>but after running ant I got this exception:</p>
  
  <blockquote>
    <p>/home/m/workspace/build.xml:58: Execute failed: java.io.IOException:
    Cannot run program "keytool" (in directory
    "/usr/java/jdk1.7.0_13/jre/bin"): error=2, No such file or directory
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)     at
    java.lang.Runtime.exec(Runtime.java:615)  at
    org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:827)
      at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:445) . .
    .</p>
    
    <p>at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)</p>
  </blockquote>
  
  <p>Any idea?</p>