Gradlew - javahome not expected at this time

Hi Fams, i am working on my website app and while i was trying to assemble the app, i got this error…

C:\Users\Ayomide\Desktop\hsms>gradlew assemble
JAVA_HOME was unexpected at this time.

i attached an image about that…

i need urgent attention to this…

Do you get the same error when running from a regular Windows command prompt or only from the IntelliJ terminal?

from my command prompt… the errors gradle not recognized as an internal or external command, operable program or batch file.

but when i set path of gradle_home, and run gradle -v

i get JAVA_HOME was not expected as this time…see below image

Nothing???

That’s a message from the Windows batch file processor. If the batch file has a “@echo off” at the top of it, change it to “rem @echo off” and run it again, and see if you can get a clue. Show the output here.

Thanks for your reply… heres my CMD Output

Microsoft Windows [Version 6.1.7600]
Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\Ayomide>gradle

C:\Users\Ayomide>if “Windows_NT” == “Windows_NT” setlocal

C:\Users\Ayomide>set DEFAULT_JVM_OPTS=

C:\Users\Ayomide>set DIRNAME=~dp0

C:\Users\Ayomide>if “~dp0” == “” set DIRNAME=.

C:\Users\Ayomide>set APP_BASE_NAME=~n0

C:\Users\Ayomide>set APP_HOME=~dp0…
JAVA_HOME was unexpected at this time.

C:\Users\Ayomide>if defined JAVA_HOME goto findJavaFromJavaHome

C:\Users\Ayomide>

I guess we should see the output of “set”, and just to be certain, the first ~25 lines of your “gradlew.bat” file. It’s obvious that the “bin” of the Gradle distribution isn’t in your PATH, but that wouldn’t cause this particular problem.

so,… whats the solution… i cant assemble my app…

You must have missed my last reply.

We need to see the output of “set” (you might want to review this and obscure anything of a secure nature), and the first 25 lines of your “gradlew.bat” file.