JAVA_HOME problem

when i run gradlew setupDecompWorkspace it returns setup failed and says please set JAVA_HOME variable in your environment to match location on your java installation. iv done this and it says the same thing.

ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jre8

Please set the JAVA_HOME variable in your environment to match the location of your Java installation

in eclipse preferences, java, build Path, Classpath Variables i have JAVA_HOME - C:\Program Files\Java\jre8

and in Control Panel\System and Security\System under Advanced system settings, advanced, environment variables, system variables i have JAVA_HOME set to C:\Program Files\Java\jre8

‘JAVA_HOME’ needs to point to a JDK installation, not a JRE. On Windows this should be something like C:\Program Files\Java\jdk1.8.0.

thank you so much it works now. thank you for the help