Intellij Idea: Importing Gradle project - getting JAVA_HOME not defined yet

后端 未结 7 1243
轻奢々
轻奢々 2021-01-29 17:37

Intellij Idea 14.1.4 Mac OS X Yosemite 10.10.3 and later.

From the IDE:

Import Project ->
(Chosen directory to import) ->
Import project from exter         


        
7条回答
  •  猫巷女王i
    2021-01-29 18:11

    If you'd like to have your JAVA_HOME recognised by intellij, you can do one of these:

    • Start your intellij from terminal /Applications/IntelliJ IDEA 14.app/Contents/MacOS (this will pick your bash env variables)
    • Add login env variable by executing: launchctl setenv JAVA_HOME "/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home"

    As others have answered you can ignore JAVA_HOME by setting up SDK in project structure.

提交回复
热议问题