Intellij 14 the supplied javaHome seems to be invalid

我只是一个虾纸丫 提交于 2019-12-08 15:55:53

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/28032764/intellij-14-the-supplied-javahome-seems-to-be-invalid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!