I recently updated to Intellij 2021.1. However, whenever I try to run my program, I get:
java: error: release version 17 not supported
I have tried snooping around for other answers, and have found none. It appears my sdk is version 16, if that helps.
This issue happened to me while upgrading to Java 17, I solved it by configuring the new SDK in project structure and invalidate the caches : File --> invalidate caches --> default selection and restart.
Your error is likely from IntelliJ attempting to call a Java 17 parser for compliance with Java 17 syntax (regardless of the SDK type) and there is no Java 17 JDK installed to perform the syntax checking with. You have 2 options.
Change 'Language Level' (Project Settings / Project in the Module Settings available from context window - right click - in the project window) to match your current SDK (ignoring possible language conflicts with more recent versions)
Download a Java 17 JDK to perform parsing with. That is in Platform Settings/SDKs in the same context menu, select '+', select 'Download JDK', then download and install a Java 17 version.
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