Gradle executes but only in its own directory

589 views Asked by At

I was attempting to install Gradle but it does not seem to work outside of its own bin directory.

I edited the PATH and the gradle_home so they are both in required folders.

C:\Users\shenj>gradle
'gradle' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\shenj>cd Downloads\gradle-2.4-all\gradle-2.4\bin

C:\Users\shenj\Downloads\gradle-2.4-all\gradle-2.4\bin>gradle
:help

Welcome to Gradle 2.4.

To run a build, run gradle <task> ...

To see a list of available tasks, run gradle tasks

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

To see more detail about a task, run gradle help --task <task>

BUILD SUCCESSFUL

Total time: 2.759 secs
C:\Users\shenj\Downloads\gradle-2.4-all\gradle-2.4\bin>cd ..

C:\Users\shenj\Downloads\gradle-2.4-all\gradle-2.4>gradle
'gradle' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\shenj\Downloads\gradle-2.4-all\gradle-2.4>echo %gradle_home%
C:\Users\shenj\Downloads\gradle-2.4-all\gradle-2.4

C:\Users\shenj\Downloads\gradle-2.4-all\gradle-2.4>echo %PATH%
C:\Program Files (x86)\BlueCoat\ProxyClient\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Enterprise Vault\EVClient\;C:\Program Files (x86)\Blue Coat\ProxyClient\; C:\Users\shenj\Downloads\gradle-2.4-all\gradle-2.4\bin

Is there anything I need to do in order to build gradle in my project folder?

1

There are 1 answers

1
Roman On BEST ANSWER

There is an extra space in your PATH just after the semicolon:

...; C:\Users\shenj\Downloads\gradle-2.4-all\gradle-2.4\bin
    ^

I believe it is the cause.