When I run my Ant build in Eclipse, I\'m getting the following error message and the Ant build fails.
Error Message: Error running javac.exe compile
We hit the same issue on a windows build machine whereas locally (on a unix machine) everything worked out. Fork = true didnt helped either, it resulted in a Process fork failed exception also only on the build server
Research
After some research, we had a clue that the classpath might be too long. We recreated the exact folder structure locally on a windows machine and we hit the same issue and we saw that the classpath was way too long (we used -v and -d for details how long it was) and this was the cause of the error.
Solution
The solution was to create a jar, which contains only the manifest with all the libraries, see this answer for more details