Hi!
I'm having some problems with my build files while running junit tests via ant. The build worked fine until a couple of days ago when I got a "process fork failed" error message. Further down in the stack trace i got:

Caused by: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.6.0_25\jre\bin\java.exe" (in directory "C:\p4work\user\product\aProduct\stdproduct\6.9-MAINT\_tmp_derived\dist"): CreateProcess error=87, The parameter is incorrect

From what I understad so far, the arguments passed to javac are way to long for windows to handle.

I googled some and found this:

http://huionn.wordpress.com/2010/03/26/ant-javac-failed-with-%E2%80%9Cerror87-the-parameter-is-incorrect%E2%80%9D/

Apparently there is a way to pass arguments in a file, but my problems is how to do this with junit in ant? Another solution is to try to shorten the arguements that are passed.

Does anyone recognize this problem?

Hi!
I'm having some problems with my build files while running junit tests via ant. The build worked fine until a couple of days ago when I got a "process fork failed" error message. Further down in the stack trace i got:

Caused by: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.6.0_25\jre\bin\java.exe" (in directory "C:\p4work\user\product\aProduct\stdproduct\6.9-MAINT\_tmp_derived\dist"): CreateProcess error=87, The parameter is incorrect

From what I understad so far, the arguments passed to javac are way to long for windows to handle.

I googled some and found this:

http://huionn.wordpress.com/2010/03/26/ant-javac-failed-with-%E2%80%9Cerror87-the-parameter-is-incorrect%E2%80%9D/

Apparently there is a way to pass arguments in a file, but my problems is how to do this with junit in ant? Another solution is to try to shorten the arguements that are passed.

Does anyone recognize this problem?

if the problem is your arguments are too long maybe try using windows built in paths such as: %ProgramFiles%->c:\ProgramFiles\.. or %Windir%/%systemroot%->c:\windows\.. or %UserProfile% c:\Users\UserName... if doing that does not help try just shortening the path by moving the files you need to call to a shorter path-this however i do not recomend.

an example in cmd would be:

cd "c:\Program Files\"

instead use:

cd %ProgramFiles%
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.