# Gradle Error with Visual Studio Code with Minecraft

**URL:** <https://discuss.gradle.org/t/gradle-error-with-visual-studio-code-with-minecraft/45953>\
**Category:** Help/Discuss\
**Created:** [July 3, 2023, 1:35pm UTC](https://discuss.gradle.org/t/gradle-error-with-visual-studio-code-with-minecraft/45953 "2023-07-03T13:35:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![plunkscomputers](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/plunkscomputers/32/10455_2.png) [@plunkscomputers](https://discuss.gradle.org/u/plunkscomputers)\
**Post date:** [July 3, 2023, 1:35pm UTC](https://discuss.gradle.org/t/gradle-error-with-visual-studio-code-with-minecraft/45953/1 "2023-07-03T13:35:58Z")

</div>

Hey I am new here, and I need to ask a question about a issue I’m having with Gradle using Visual Studio Code when trying to make a mod for Minecraft. Just wondering if this is the right place to ask for help? Thanks

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [July 3, 2023, 1:46pm UTC](https://discuss.gradle.org/t/gradle-error-with-visual-studio-code-with-minecraft/45953/2 "2023-07-03T13:46:21Z")

</div>

Well, my personal recommendation would be not to use a fancy text editor, but a proper IDE, especially IntelliJ IDEA. 😃

Other than that, the question is what your question is, for that also refer to [https://dontasktoask.com/](https://dontasktoask.com/) 😉

Generally, if the question is a Gradle question, it might be fine.  
If it is specific about the Gradle support within VSC, you might just not get an answer eventually, depending on whether someone reads your post that is familiar with your post and able and willing to help. 🙂

---

<div class="post-metadata">

**Author:** ![plunkscomputers](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/plunkscomputers/32/10455_2.png) [@plunkscomputers](https://discuss.gradle.org/u/plunkscomputers)\
**Post date:** [July 3, 2023, 1:51pm UTC](https://discuss.gradle.org/t/gradle-error-with-visual-studio-code-with-minecraft/45953/3 "2023-07-03T13:51:09Z")

</div>

Thank you for the fast reply, so I think it may be something simple but not sure. When I go to open a folder in VSC I see at the bottom it says Gradle Build Error. Below is what it tells me.

```plaintext
* Where:
Initialization script 'C:\Users\PLUNK'~1\AppData\Local\Temp\b33b033d91622d646ce8442a240a1ea8e88b57e8824e089e7e469715fb35c3c4.gradle' line: 3

* What went wrong:
Could not compile initialization script 'C:\Users\PLUNK'~1\AppData\Local\Temp\b33b033d91622d646ce8442a240a1ea8e88b57e8824e089e7e469715fb35c3c4.gradle'.
> startup failed:
  initialization script 'C:\Users\PLUNK'~1\AppData\Local\Temp\b33b033d91622d646ce8442a240a1ea8e88b57e8824e089e7e469715fb35c3c4.gradle': 3: Unexpected character: '\'' @ line 3, column 125.
     730aa85c931443dbb5a9cf0346.jar')
                                   ^
  
  1 error

```

---

<div class="post-metadata">

**Author:** ![plunkscomputers](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/plunkscomputers/32/10455_2.png) [@plunkscomputers](https://discuss.gradle.org/u/plunkscomputers)\
**Post date:** [July 3, 2023, 2:29pm UTC](https://discuss.gradle.org/t/gradle-error-with-visual-studio-code-with-minecraft/45953/4 "2023-07-03T14:29:53Z")

</div>

How can I post the error code without getting the post hidden? The spam bot keeps picking it up?

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [July 3, 2023, 2:34pm UTC](https://discuss.gradle.org/t/gradle-error-with-visual-studio-code-with-minecraft/45953/5 "2023-07-03T14:34:51Z")

</div>

I don’t know how the spam-bot filters it, but once someone with appropriate powers reviewed it and approved it is not spam, it should be visible. I try to get someone taking action.

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [July 3, 2023, 4:48pm UTC](https://discuss.gradle.org/t/gradle-error-with-visual-studio-code-with-minecraft/45953/7 "2023-07-03T16:48:54Z")

</div>

Can you show the contents of the file it complained about? (`C:\Users\PLUNK'~1\AppData\Local\Temp\b33b033d91622d646ce8442a240a1ea8e88b57e8824e089e7e469715fb35c3c4.gradle`)

But most probably this is a VSC bug.  
I guess the Gradle integration in VSC dynamically creates that init script and has some error there.

---

<div class="post-metadata">

**Author:** ![plunkscomputers](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/plunkscomputers/32/10455_2.png) [@plunkscomputers](https://discuss.gradle.org/u/plunkscomputers)\
**Post date:** [July 3, 2023, 4:58pm UTC](https://discuss.gradle.org/t/gradle-error-with-visual-studio-code-with-minecraft/45953/8 "2023-07-03T16:58:49Z")

</div>

Sure here is the contents of the file.

```plaintext
initscript {
	dependencies {
		classpath files('C:/Users/PLUNK'~1/AppData/Local/Temp/76231bf8c8a92e6eef05a0ce788e0a1e64b811730aa85c931443dbb5a9cf0346.jar')
	}
}

allprojects {
	apply plugin: com.microsoft.gradle.GradlePlugin
}
```

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [July 3, 2023, 5:16pm UTC](https://discuss.gradle.org/t/gradle-error-with-visual-studio-code-with-minecraft/45953/9 "2023-07-03T17:16:46Z")

</div>

The problem is with your user directory that contains a single-quote.  
The init script the VSC Gradle integration generates puts that path within single-quotes but does not escape the single quote that is present in the path.  
This makes the script invalid.  
So you should report that as bug to the VSC Gradle integration developers.

As a work-around you would need to use a user directory without single-quotes, or somehow a custom temp directory that is not within your user directory.

I cannot tell you how to achieve the latter, as I have no idea where VSC takes the temp path from. If you are lucky, it looks at the `TEMP` environment variable and you can just change that.

---

<div class="post-metadata">

**Author:** ![plunkscomputers](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/plunkscomputers/32/10455_2.png) [@plunkscomputers](https://discuss.gradle.org/u/plunkscomputers)\
**Post date:** [July 3, 2023, 5:19pm UTC](https://discuss.gradle.org/t/gradle-error-with-visual-studio-code-with-minecraft/45953/10 "2023-07-03T17:19:03Z")

</div>

So I need to make a new user account on my pc and just have a single user name like mod and install everything on that side and try it? I was thinking it may of been because my username had ’ and separate words in it.

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [July 3, 2023, 5:32pm UTC](https://discuss.gradle.org/t/gradle-error-with-visual-studio-code-with-minecraft/45953/11 "2023-07-03T17:32:23Z")

</div>

If you cannot rename the user dir, you need a new account, yes.  
Or as I said a non-default temp directory.  
It’s always a good idea to not have special characters or spaces in the username.  
Even nowadays there is software that does not deal well even with spaces in paths.

---

<div class="post-metadata">

**Author:** ![plunkscomputers](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/plunkscomputers/32/10455_2.png) [@plunkscomputers](https://discuss.gradle.org/u/plunkscomputers)\
**Post date:** [July 3, 2023, 5:36pm UTC](https://discuss.gradle.org/t/gradle-error-with-visual-studio-code-with-minecraft/45953/12 "2023-07-03T17:36:27Z")

</div>

ok thanks for the help, I will give it a try later on and post an update!
