Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorrect

Problem: build CI service, an automated build use ant scripts compile times wrong: under Caused by: Java. IO. IOException: CreateProcess error = 87, The parameter is incorrect, search found at https://community.oracle.com/thread/2245134?Tstart =0 says this is a problem because the classpath is too long, which seems understandable considering the JAR files
Check buld.xml for configuration items

fork="true"

Ant will create a new virtual machine to run the compile task, so here’s the problem, this will involve passing parameters between processes
https://support.microsoft.com/zh-cn/kb/830473, more than xp, the longest can support 8091, Win2000 longest support 2047, actually on the server manually run the same error, should be a directory hierarchy is too long, too deep to parameters than the longest support character;

Solution: Remove fork=”true” from build.xml and run again

Read More: