Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA 2016.1(64) : Unsupported java version Cannot start under Java 1.7.0_79-b15: Java 1.8 or later is required

Currently I set JAVA_HOME environment variable to 1.7

When I try to open the file idea64.exe (path : ..\JetBrains\IntelliJ IDEA 2016.1\bin\idea64.exe) below error is populated

enter image description here

Unsupported java version
Cannot start under Java 1.7.0_79-b15: Java 1.8 or later is required.

From the above error I understood that I have to set my JAVA_HOME to 1.8, but I don't want to set JAVA_HOME to 1.8.

I believe there should be a configuration file where in I can point to Java-8 and fix this, can anyone please let me know where can I do the configuration changes?

like image 876
user2587669 Avatar asked Mar 29 '16 12:03

user2587669


People also ask

Does IntelliJ support JDK 18?

Java 18 has now been released, and starting from version 2022.1, IntelliJ IDEA offers support for it.

Does IntelliJ support JDK 16?

The early access versions of 2021.1 are already available. You can configure it to use Java 16 by selecting 16 as the Project SDK and choosing 16 (Preview) – Sealed types in the Project language level for your Project and Modules settings. You can also download Java 16 directly from IntelliJ IDEA.

How do I switch to JDK 8 in IntelliJ?

From the main menu, select File | Project Structure | Project Settings | Project. If the necessary JDK is already defined in IntelliJ IDEA, select it from the SDK list.


2 Answers

You should create IDEA_JDK_64 environment variable and set its value to JDK8 instance location on your computer.

This JDK8 instance can be used only for idea and JAVA_HOME can point to the Java 7 at the same time without any problems.

Via documentation:

idea64.exe uses this JDK search sequence:

  • IDEA_JDK_64 environment variable
  • ..\jre64 directory
  • system Registry
  • JDK_HOME environment variable
  • JAVA_HOME environment variable
like image 173
Cootri Avatar answered Oct 12 '22 13:10

Cootri


Creating the IDEA_JDK_64 environment variable pointing to the current JDK 8 installation didn't work for me on Windows 7.

What worked was starting IDEA from its script residing in:

<your location of>\IntelliJ IDEA Community Edition 2016.1.1\bin\idea.bat

On Windows, one can map a shortcut to that location and change its icon to:

<your location of>\IntelliJ IDEA Community Edition 2016.1.1\bin\idea.ico

like image 41
Simeon Leyzerzon Avatar answered Oct 12 '22 12:10

Simeon Leyzerzon