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.