JAVA_HOME is set to an invalid directory


Question

I'm working with gradle and trying to deploy my JAVAFX application into .apk

If i run my gradle command it says that my JAVA_HOME is set to an invalid directory.

It is set to C:\Program Files\Java\javaversion\bin (there is an actual version actually, but it isn't necessery atm) And the same is at the environment variable.

Any ideas, why i'm getting this error?

1
2
5/11/2014 1:26:20 PM

What is JAVA_HOME?

Its an Environment variable that helps to locate JDK and JRE.

As you are setting it to.

C:\Program Files\Java\javaversion\bin 

JAVA_HOME Should be set to root directory not upto bin

C:\Program Files\Java\javaversion

And in path variable put

C:\Program Files\Java\javaversion\bin OR %JAVA_HOME%\bin

You can read more about from This Link.

8
5/11/2014 1:39:15 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon