'Cannot determine path to 'tools.jar' library for 18 (C:/Program Files/jdk-18.0.1.1)

i want to run my code in intellij ide (community edition) and when i try to run it, i got this error

Cannot determine path to 'tools.jar' library for 18 (C:/Program Files/jdk-18.0.1.1)

This is the ScreenShot of the error

help me pls... i want to learn kotlin use intellij ide

And this is my JAVA_HOME

version ide : 2020.2 Thank you :)



Solution 1:[1]

The problem is with version of JDK you are using. The Intellij version 2020.2 supports only upto JDK 14. So either you have to lower the JDK version to 14 or update the IntelliJ to a newer version like 2021.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1