Eclipse – CreateProcess error=87, The parameter is incorrect

antblackberryeclipse

While building with ant, I am getting the following error:

java.io.IOException: Cannot run program "D:\Tools\Java\jdk1.6.0_12\jre\bin\java.exe": (my Project & its path)Error: CreateProcess error=87, The parameter is incorrect

Any idea how to fix it?

Best Answer

I received this error as well, but for different cases than what is listed. I get this when attempting to execute JUnit tests in an Eclipse project whose workspace path is too long; moving the project to a shorter path resolved this issue.

Cannot run program "C:\Program Files\Java\jdk1.6.0_26\jre\bin\java.exe": (Long Project Path Path)Error: CreateProcess error=87, The parameter is incorrect