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.
Even though my JDK directory looks fine to me and worked last time I loaded IntelliJ
So I am selecting a valid JDK directory and yet still I get this error.
What could cause this? What could fix this?
First at all, you need to select the C:\ folder. Then, you select Program Files. After it, you select java, and finally the jdk you downloaded.
Now home directory for jdk will be: "C:\Program Files\Java\jdk1.
If the necessary JDK is already defined in IntelliJ IDEA, select it from the SDK list. If the JDK is installed on your computer, but not defined in the IDE, select Add SDK | JDK, and specify the path to the JDK home directory (for example, /Library/Java/JavaVirtualMachines/jdk-12.0. 1. jdk).
IntelliJ stores the JDK version used by the project within its Project Structure. There are two ways to locate this: Via menu navigation: Navigating to File -> Project Structure.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With