Running a java compilation in forked mode on Windows 8 hangs


(maksymus007) #1

I try to solve my problem and get answer http://stackoverflow.com/questions/19124873/sun-jpegimageencoder-compilation-in-gradle

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.


(Szczepan Faber) #2

What versions of Gradle do you observe this behavior?

Cheers!


(maksymus007) #3

C:\workspace>gradle -v

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

Build time:

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

7970ec3503b4f5767ee1c1c69f8b4186c4763e3d

Groovy:

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


(Szczepan Faber) #4

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


(maksymus007) #5

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.


(Peter Niederwieser) #6

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


(maksymus007) #7

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


(Peter Niederwieser) #8

Raised GRADLE-2913.