[SOLVED] Windows, Cygwin and Gradle: How to portably set up options.bootClasspath? Error: Fatal Error: Unable to find package java.lang in classpath or bootclasspath

Ok, I see from the `gradle’ launch script that the JAVA_HOME is being correctly reset inside the Cygwin environment.

Line 45

# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

So really forking the JVM to compile should reuse this setting or it perhaps the child process in then resetting the JAVA_HOME. Under a Cygwin environment, how does Gradle fork the JVM process?