0

I have IntelliJ IDEA Ultimate Edition 2022.1 installed, but when I tried to launch idea64.exe, I got the following popup message:

The environment variable JAVA_HOME (with the value of C:\Program Files\Java\jdk1.8.0_341) does not point to a valid JVM installation.

I do have the JDK with the path C:\Program Files\Java\jdk1.8.0_341. To verify, I went into the bin folder and was able to execute java.exe manually.

Next, from the command window, I changed JAVA_HOME to C:\Program Files\Java\jre-11.0_15.1. This time idea64.exe could be launched successfully.

What is the reason that it cannot launch when JAVA_HOME points to a Java 8 JDK, but can launch when JAVA_HOME points to a Java 11 JRE?

user3573403
  • 1,780
  • 5
  • 38
  • 64
  • Presumably, the IDEA 2022.1 platform relies on features that are not available in Java 8. Or maybe it is just the classfile version numbers. But does it really matter why? Just set JAVA_HOME to Java 11 when you launch IDEA. Move on, nothing happening here :-) – Stephen C Aug 16 '22 at 02:59
  • I just found out that IDEA 2022.1 requires JVM 11. That's why JDK 8 won't work. I downloaded Community Edition, and I was able to start idea64.exe. It uses its own JVM by default, which is in the "jbr" folder. For my Ultimate Edition, it was installed by my company's automated software request process, and somehow the installation does not come with its own JVM. In that case, it will find a JVM defined under JAVA_HOME. – user3573403 Aug 16 '22 at 03:08

1 Answers1

0

According to the first paragraph of https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under Java 8 is no longer supported to run Intellij IDEA1.

The link also says that Java 11 is bundled with the standard installer. Presumably, a standard install would ignore your JAVA_HOME setting if the user was launching IDEA in the recommended way. There is no mention of JAVA_HOME in the main IDEA documentation.

It would seem that the JAVA_HOME sensitivity is due to something your company has done in their "automated software request process".

Either way, just setting JAVA_HOME to a Java 11 installation would be sufficient to make IDEA work for you. (Alternatively, use the vendor's standard installer.)


1 - Why? I expect that they want / need to make use of Java 11 features in their product, and there is no compelling reason not to. Either way, it is a business decision.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216