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?
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
In my case, removing duplicate jars solved the problem.
My scenario will probably be one no one else will find. I was getting the error in IntelliJ.
After spending a long time on the web I found that I had a =
in my Environment Variables, although none was set. This was the residue of a ENV Variable I had set previously but deleted. For some reason this non-editable field contained that =
and the only way I could remove it was by adding a dummy ENV property and removing it again.
After I removed it, it worked.
I had this error in a JenkinsFile build during git checkout. It turned out that the Jenkins node config contained an empty environment variable
Removing this empty variable solved the problem. Looks similar to what @bitoiu answered.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With