# I can't get windows environment variable to work

**URL:** https://discuss.gradle.org/t/i-cant-get-windows-environment-variable-to-work/35371
**Category:** Help/Discuss
**Created:** [March 23, 2020, 7:01pm UTC](https://discuss.gradle.org/t/i-cant-get-windows-environment-variable-to-work/35371 "2020-03-23T19:01:58Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![FodorTM](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/fodortm/32/8394_2.png) [@FodorTM](https://discuss.gradle.org/u/FodorTM)
#### Post date: [March 23, 2020, 7:01pm UTC](https://discuss.gradle.org/t/i-cant-get-windows-environment-variable-to-work/35371/1 "2020-03-23T19:01:58Z")

</div>

Hi I have a video of my problem on AWS:  
copy and paste

[https://videos-billcory.s3-us-west-2.amazonaws.com/gradle/bad-something-gradle.mp4](https://videos-billcory.s3-us-west-2.amazonaws.com/gradle/bad-something-gradle.mp4)

---

<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: [March 24, 2020, 2:06am UTC](https://discuss.gradle.org/t/i-cant-get-windows-environment-variable-to-work/35371/2 "2020-03-24T02:06:50Z")

</div>

System variables are not aliases for commands. All you’ve done there is create a variable that could be accessed as `%gradle%` with the value `C:\Software\Gradle\gradle-6.2.2-all\bin`.

If you want the `gradle` binary to be found from any directory, you need to add `C:\Software\Gradle\gradle-6.2.2-all\bin` to the `PATH` variable (each path `;` separated).

Alternatively, if you really want a separate System variable, it would be more conventional to set something like `GRADLE_HOME`:

```gradle
GRADLE_HOME C:\Software\Gradle\gradle-6.2.2-all

```

Then add just `%GRADLE_HOME%\bin` to the `PATH`.

---

<div class="post-metadata">

### Author: ![FodorTM](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/fodortm/32/8394_2.png) [@FodorTM](https://discuss.gradle.org/u/FodorTM)
#### Post date: [March 24, 2020, 4:14am UTC](https://discuss.gradle.org/t/i-cant-get-windows-environment-variable-to-work/35371/3 "2020-03-24T04:14:51Z")

</div>

Thanks James. I was able to get it to work. I don’t know where to start using Gradle, but I’m wanting to use Twilio Voice and Twilio asks me to use Gradle or Maven. So here is where I am right now and I’m having a problem …See video:[https://videos-billcory.s3-us-west-2.amazonaws.com/gradle/webapp.mp4](https://videos-billcory.s3-us-west-2.amazonaws.com/gradle/webapp.mp4)

---

<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: [March 24, 2020, 4:38am UTC](https://discuss.gradle.org/t/i-cant-get-windows-environment-variable-to-work/35371/4 "2020-03-24T04:38:12Z")

</div>

The `mkdir -p src/main/webapp/WEB-INF` command in the guide is written for Linux / MacOS. The `-p` option should not be used on Windows.

---

<div class="post-metadata">

### Author: ![FodorTM](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/fodortm/32/8394_2.png) [@FodorTM](https://discuss.gradle.org/u/FodorTM)
#### Post date: [March 24, 2020, 5:09pm UTC](https://discuss.gradle.org/t/i-cant-get-windows-environment-variable-to-work/35371/5 "2020-03-24T17:09:05Z")

</div>

Hi James, let me know if I’m supposed to start a new thread or if I can contact you via the reply

My main objective is to send voice messages to landline phones. I’m following along the Programable voice using quickstart for java document from Twilio. I made lots of progress but now I’m stuck following the document which has led me to use more tools. IntelliJ and other programs that I’m not at all familiar with. I want to ask Twilio for Phone Support but it’s either too expensive or not available.

Here is the link to where I’m currently stuck. I hope this video is somewhat helpful?

[https://videos-billcory.s3-us-west-2.amazonaws.com/gradle/QuickstartGuide1.mp4](https://videos-billcory.s3-us-west-2.amazonaws.com/gradle/QuickstartGuide1.mp4)

---

<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: [March 24, 2020, 7:53pm UTC](https://discuss.gradle.org/t/i-cant-get-windows-environment-variable-to-work/35371/6 "2020-03-24T19:53:39Z")

</div>

The dependency line goes in the `build.gradle` file, not the command line, which you eventually started looking for. Your sample project did have a `build.gradle`, but the icon is the elephant now instead of the old logo, so it doesn’t stand out as much.
