I have just removed version 1.8.0_202
version of java and reinstalled a newer version 1.8.0_321
. Now IntelliJ is failing to "Deploy/Run WAR on Weblogic". It is failing with
The JRE was not found in directory C:\PROGRA~1\Java\JDK18~1.0_2. (JAVA_HOME)
My Environment Variables have
JAVA_HOME = C:\Program Files\Java\jdk1.8.0_321
PATH has %JAVA_HOME% and %JAVA_HOME%\bin
Using a command prompt or Bash shell I can echo JAVA_HOME and the correct value is returned.
I can run the following and it correctly finds Java and outputs the correct version
java -version
In IntelliJ I have the Project Structure -> Project Settings, Project Structure -> Platform Settings, Settings -> Build, Execution, Deployment -> Gradle all having the JDK set to the correct Java Home.
However, In IntelliJ, in a terminal if i echo $JAVA_HOME
it has no value.
I have searched for a solution and all refer to ensuring you have your project settings correct which I do. I am completely baffled as to why its no longer working. Also its interesting that it mentions a completely different java version than what i am using (Java18)