IntelliJ IDEA “The selected directory is not a valid home for JDK”

后端 未结 11 1257
梦如初夏
梦如初夏 2020-12-05 12:19

I just installed IntelliJ IDEA and I\'m trying to set it up. I\'ve gotten to the part where I need to select my home directory for my JDK.

I tried navigating to my J

相关标签:
11条回答
  • 2020-12-05 13:17

    Because you are choosing jre dir. and not JDK dir. JDK dir. is for instance (depending on update and whether it's 64 bit or 32 bit): C:\Program Files (x86)\Java\jdk1.7.0_45 In my case it's 32 bit JDK 1.7 update 45

    0 讨论(0)
  • 2020-12-05 13:17

    May be your jdk is in /usr/lib/jvm/. This variant for linux.

    0 讨论(0)
  • 2020-12-05 13:21

    One thing we should note: the jdk should be installed on C: drive.

    I had JDK installed on my D: drive like this:

    D:\Program Files\Java\jdk1.8.0_101
    

    And it would still give me the same error. For some reason Java should be installed on C: drive.

    0 讨论(0)
  • 2020-12-05 13:21

    I ended up needing to replace 2017 with 2019, and everything worked fine. /shrug... no other suggestions here worked for me.

    0 讨论(0)
  • 2020-12-05 13:22

    This error occurs because if you choosing the path deep in JDK or JRE. The exact path that should be chosen is in my case 64 bit

    C:\Program Files\Java\jdk1.8.0_91

    if 32 bit

    C:\Program Files (86)\Java\jdk1.8.0_91

    0 讨论(0)
提交回复
热议问题