Running a java compilation in forked mode on Windows 8 hangs

I try to solve my problem and get answer

When I run compilation with forked mode it hangs - I mean the debug output is like

10:12:51.796 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTING 10:12:51.797 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Waiting until process started: command ‘javac’. 10:12:51.821 [INFO] [org.gradle.process.internal.ProcessParentingInitializer] An attempt to initialize for well behaving parent process finished.

And nothing ever happens, process is still active. I run the same on Ubuntu - no problem, runs fine. I only have a problem on my Windows 8 machine. I found somewhere that windows have a problem with long commands, so I reduced this to only 3 or 4 java files (total command length is way below 500 chars) but it changes nothing.

When I set useAnt to true - everything compiles.

I also tried other command which are for sure in available - like dir or echo - effect is the same. When I insert garbage as a executable name - nothing changes. I tried running gradle command as admin - no change.

What versions of Gradle do you observe this behavior?


C:\workspace>gradle -v

------------------------------------------------------------ Gradle 1.8 ------------------------------------------------------------

Build time:

2013-09-24 07:32:33 UTC Build number: none Revision:



1.8.6 Ant:

Apache Ant™ version 1.9.2 compiled on July 8 2013 Ivy:

2.2.0 JVM:

1.7.0_25 (Oracle Corporation 23.25-b01) OS:

Windows 8 6.2 amd64

Thanks. Can you try with Gradle 1.7? Are you using the parallel build?

Im not using parallel build.

I first run it on gradle 1.6 (the one I had already installed), then switched to newest 1.8. I also run it on 1.7 - it behaves exactly the same.

Have you made sure that ‘javac’ is on the PATH? Have you tried with the full pathname?

Yes. javac is on the PATH. But I also tried with full path, tried using javac.exe instead of javac. I also moved my JDK to C:\ to avoid spaces in the name. Nothing changed

Raised GRADLE-2913.