Intellij JAVA_HOME variable

后端 未结 5 1515
南旧
南旧 2021-01-31 07:00

I started using Gradle and Intellij but I am having problems to configure Gradle\'s JVM. When I start a new Gradle project I am not allowed to define JVM as my JAVA_HOME variabl

5条回答
  •  攒了一身酷
    2021-01-31 07:54

    Bit counter-intuitive, but you must first setup a SDK for Java projects. On the bottom right of the IntelliJ welcome screen, select 'Configure > Project Defaults > Project Structure'.

    The Project tab on the left will show that you have no SDK selected:

    Therefore, you must click the 'New...' button on the right hand side of the dropdown and point it to your JDK. After that, you can go back to the import screen and it should be populated with your JAVA_HOME variable, providing you have this set.

提交回复
热议问题