IntelliJ not recognising JDK version

14,372

Solution 1

I got this same error message just recently in IntelliJ IDEA 9.0.4. "Cannot Detect JDK Version", "Probably JDK installed in C:\Program Files\Java\jdk1.6.0_24 is corrupt."

I was able to solve it by removing the JDK from Project Structure | SDKs and then re-adding it.

Solution 2

What is the output of the "java -version" for this JDK installation? It could be that the output contains some non-standard strings before the actual version information. Such strings can be added by the environment variables on your system. IDEA may not be able to parse this output and detect the JDK version correctly.

Share:
14,372
Admin
Author by

Admin

Updated on August 21, 2022

Comments

  • Admin
    Admin over 1 year

    I have write one java project on IntelliJ idea 8.1.1.When I go to compile option of IntelliJ IDEA 8.1.1 then it shows pop-up message box, in that it shows error-

    cannot determine version for JDK
    Update JDK configuration.

    Even though I have proper JDK version, I have jdk1.5.0 installed in my PC working properly with other environment. Please suggest any settings that I may need to change.

  • Lyoneel
    Lyoneel over 9 years
    Yes is correct, is because of string generated from $_JAVA_OPTIONS in my case -> "Picked up _JAVA_OPTIONS: ..." before all the standard string from "java -version"