I'm on windows and have set the environment JDK for the intelli J project to jdk 1.8 as well as the path for JAVA_HOME in the system variable setting to the jdk 1.8 path however when I try to use "gradle build" in the local terminal in intelli j it tells me
"ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk-10.0.2
Please set the JAVA_HOME variable in your environment to match the location of your Java installation."
When I buil the project in cmd prompt it works fine however I'd like to be able to do it in the local terminal. Is there a command to let me set the path for JAVA_HOME through the intelli j terminal?