Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij 14 the supplied javaHome seems to be invalid

When first launching IntelliJ IDEA Community Edition 14.0.2 on Windows 7 x64 I received the following error when trying to import the sample libGDX gradle config:

Intellij 14 the supplied javaHome seems to be invalid

The IDE is looking in C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 14.0.2\jre for the java runtime, but the files exist in a sub directory off this one: C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 14.0.2\jre\jre.

My solution was to copy the contents of jre\jre up one level to jre, which solved the problem - but doesn't feel like the right thing to do.

Is this an acceptable solution, or is there a 'better way' to solve this? It feels strange to me that the default install is not in the correct location; but there might be something environmental that I'm not quite understanding.

This was recorded as a duplicate, but it is not - it is a different product. Android Studio is a different product to IntelliJ-Idea.

like image 859
Rots Avatar asked Jan 19 '15 20:01

Rots


1 Answers

Since you have a 64-bit Java as your JAVA_HOME, run the 64-bit version on IntelliJ instead, idea64.exe in the bin directory of your IntelliJ installation; for example:

C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 14.0.2\bin\idea64.exe
like image 168
MotohawkSF Avatar answered Oct 23 '22 05:10

MotohawkSF