Gradle wrapper is failing on Window7 with 'Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain'


(ChandraShekhar) #1

gradle wrapper ‘gradlew’ is failing on Window7 with ‘Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain’

c:\git_storage\wrapper>gradlew
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain

If I do a ‘ls’ for gradle-wrapper.jar then the same command works

c:\git_storage\wrapper>ls -l gradle\wrapper\gradle-wrapper.jar
-rw-r–r-- 1 cvaishna Domain Users 51348 Mar 9 22:20 gradle\wrapper\gradle-wrapper.jar

c:\git_storage\wrapper>gradlew
:help

Welcome to Gradle 1.12.

To run a build, run gradlew …

To see a list of available tasks, run gradlew tasks

To see a list of command-line options, run gradlew --help

BUILD SUCCESSFUL

Total time: 26.468 secs

Now if I execute the same command again (after some time) then it once again failed

c:\git_storage\wrapper>gradlew
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain

FYI - I am using Gradle v1.12


(Dave Durst) #2

Did you every figure out this issue? I’m seeing the same results with version 2.8.