Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to use 'gradlew' wrapper file - is the Gradle wrapper jar file, missing? #1

Open
sixman9 opened this issue Apr 20, 2016 · 1 comment

Comments

@sixman9
Copy link
Contributor

sixman9 commented Apr 20, 2016

I can't get your 'hello-world-scala' example to work, out of the box. When I try to execute ./gradlew tasks I get the following error :

Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain

You might not have checked in the corresponding Gradle wrapper JAR file (gradle-wrapper.jar) as mentioned within the gradlew executable script, itself (see $APP_HOME/gradle/wrapper/gradle-wrapper.jar). This might be because you didn't stage it in Git or have a '.gitignore' file which ignores JAR files (also, the file appears to be missing in all sub-projects).

This topic is discussed in the Stackoverflow post

In the meanwhile, adding the following to a local copy of build.gradle and executing gradle wrapper a local, installed version of Gradle, on my PATH, should be sufficient to get this working:

task wrapper(type: Wrapper) {
    gradleVersion = '2.12'
}

JFYI, I'm on Mac OSX (El Capitan 10.11.2, Java 1.8.0_45-b14)

BTW, thanks for the code.

@RichardHightower
Copy link
Contributor

Thanks. You can send a PR with your change to the gradle.build if you want and then i will close this with the PR. Thanks again. You Rock!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants