IntelliJ - The selected directory is not a home for JDK
Asked Answered
F

1

8

Similar to this question IntelliJ, "The selected directory is not a home for JDK", I am getting an error that my JDK directory suddenly is not valid.

Intellij JDK error

Even though my JDK directory looks fine to me and worked last time I loaded IntelliJ

My JDK directory

So I am selecting a valid JDK directory and yet still I get this error.

My Version of IntelliJ

What could cause this? What could fix this?

Funeral answered 18/2, 2016 at 1:7 Comment(6)
How did you install jdk/java?Ravenravening
@Ravenravening I downloaded the JDK from oracle's web site.Funeral
Question was how did you install it? Have you just extracted the jdk directory just out of java installer file? or did you install normally following the installer wizard.Ravenravening
Double click and installed it as admin. I'll try reinstalling it just in case (but tomorrow, I need to wait for a process to finish)Funeral
Can you check if you have tool.jar, 'rt.jar' files in JAVA_HOME/lib directory?Ravenravening
You were right -- somehow the tool.jar went missing. I am perplexed. This solved the problem though -- reinstalling JDK 1.7_80. If you submit this as your answer I will accept it.Funeral
R
6

That is because of tool.jar and/or rt.jar file(s) being missed from JAVA_HOME/lib directory.

Reinstalling java can resolve this issue.

Ravenravening answered 18/2, 2016 at 19:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.