1

I have declared JAVA_HOME in environment variables and I have the following value in PATH: C:\Java\jre1.8.0_45\bin;%JAVA_HOME%; But still while launching IntelliJ I am getting below error.

enter image description here

The values from command prompt:

enter image description here

PS: This is a different problem. But the one I am facing does not have any such issue. I have JRE in my path variable and JDK in JAVA_HOME.(attached the screenshots)

Community
  • 1
  • 1
HookUp
  • 393
  • 1
  • 6
  • 20
  • Possible duplicate of [Android Studio error: "Environment variable does not point to a valid JVM instalation"](http://stackoverflow.com/questions/23185358/android-studio-error-environment-variable-does-not-point-to-a-valid-jvm-instal) – DimaSan Nov 24 '16 at 17:45
  • Modern versions of IntelliJ come with their own supported JVM which "just works". – Thorbjørn Ravn Andersen Nov 24 '16 at 19:03
  • I have uninstalled and installed the latets version of IntelliJ again. But still it is still the same – HookUp Nov 24 '16 at 19:11

2 Answers2

3

Your %JAVA_HOME% variable should point to the directory of Java installation. Here's what you can do to fix it.

  1. Set %JAVA_HOME% to C:\Java\jre1.8.0_45\
  2. Add %JAVA_HOME%\bin to your %PATH% variable
slawekpl
  • 305
  • 2
  • 5
0

you can also add JDK to your system variables and point it to the JRE folder (do not point it to BIN folder)

kavehmb
  • 9,822
  • 1
  • 19
  • 22