# Trouble setting up gradle

**URL:** <https://discuss.gradle.org/t/trouble-setting-up-gradle/25980>\
**Category:** Help/Discuss\
**Tags:** eclipse\
**Created:** [February 26, 2018, 2:34am UTC](https://discuss.gradle.org/t/trouble-setting-up-gradle/25980 "2018-02-26T02:34:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yihao89](https://avatars.discourse-cdn.com/v4/letter/y/f0a364/32.png) [@yihao89](https://discuss.gradle.org/u/yihao89)\
**Post date:** [February 26, 2018, 2:34am UTC](https://discuss.gradle.org/t/trouble-setting-up-gradle/25980/1 "2018-02-26T02:34:40Z")

</div>

Hi, I’m following the instructions from [google](https://developers.google.com/sheets/api/quickstart/java) to build a Java application that can read/write to Google Sheets. when I run  
`gradle -q run`  
I get this:

Error: Could not find or load main class Quickstart

FAILURE: Build failed with an exception.

- What went wrong:  
Execution failed for task ‘:run’.  
\> Process ‘command ‘C:\Program Files\Java\jdk1.8.0\_162\bin\java.exe’’ finished with non-zero exit value 1

more detailed info [here](https://scans.gradle.com/s/twvfnlduocgcc/)

What did I do wrong?

---

<div class="post-metadata">

**Author:** ![jjustinic](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/jjustinic/32/9005_2.png) [@jjustinic](https://discuss.gradle.org/u/jjustinic)\
**Post date:** [February 26, 2018, 5:41am UTC](https://discuss.gradle.org/t/trouble-setting-up-gradle/25980/2 "2018-02-26T05:41:49Z")

</div>

Are you sure you followed Step 3 (`Create a file named src/main/java/Quickstart.java`) exactly as written? The `mainClassName` in Step 2 must match the name of the class exactly, so if you created a `src/main/java/QuickStart.java` or anything that doesn’t match exactly, the main class will not be found.

---

<div class="post-metadata">

**Author:** ![yihao89](https://avatars.discourse-cdn.com/v4/letter/y/f0a364/32.png) [@yihao89](https://discuss.gradle.org/u/yihao89)\
**Post date:** [February 26, 2018, 6:19am UTC](https://discuss.gradle.org/t/trouble-setting-up-gradle/25980/3 "2018-02-26T06:19:24Z")

</div>

yea the file is Quickstart and mainClassName is Quickstart, and in the correct packages

---

<div class="post-metadata">

**Author:** ![jahnjo](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@jahnjo](https://discuss.gradle.org/u/jahnjo)\
**Post date:** [March 1, 2018, 11:45pm UTC](https://discuss.gradle.org/t/trouble-setting-up-gradle/25980/4 "2018-03-01T23:45:43Z")

</div>

I have the same problem and had it previously working yesterday. When I tried it today I had the same error + permission errors.
