Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CreateProcess error=87, The parameter is incorrect

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?

like image 204
Rakesh Avatar asked Aug 07 '11 05:08

Rakesh


4 Answers

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

like image 110
Jason Brant Avatar answered Nov 19 '22 22:11

Jason Brant


In my case, removing duplicate jars solved the problem.

like image 36
johncorner06 Avatar answered Nov 19 '22 23:11

johncorner06


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.

like image 2
bitoiu Avatar answered Nov 19 '22 23:11

bitoiu


I had this error in a JenkinsFile build during git checkout. It turned out that the Jenkins node config contained an empty environment variable

Node properties showing empty variable

Removing this empty variable solved the problem. Looks similar to what @bitoiu answered.

like image 2
carl verbiest Avatar answered Nov 19 '22 22:11

carl verbiest