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
version ide : 2020.2 Thank you :)
53 Answers
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.
1I faced the same error recently (Nov 2022)
Error:Cannot determine path to 'tools.jar' library for 17 (C:\Program Files\Java\jdk-17.0.5) when using IntelliJ IDEA 2020.1.4 with JDK 17.0.5. Issue is resolved by switching to open JDK amazon-corretto-11, you can download it from here
Amazon Corretto is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK). Corretto comes with long-term support that includes performance enhancements and security fixes.
I solved the same problem this morning, i had tried many approaches like upgrading to latest JDK and downgrading to older JDKs. None of them helped me. Finally I updated to IntelliJ IDEA 2023.2.3 (Community Edition), and things started working smoothly.