I am using Intellij 2022.2 Ultimate version. I have recently started to work on project which involves java17. This is a spring boot application. I am trying to do a maven package from the IDE (From the maven tab in Intellij) I am getting the below error.
invalid target release: 17
Upgrade Module sdk in project settings to 17 or higher.
When I try to add jdk 17 to my sdk, I get an error saying.
"Cannot find jdk classes in the folder"
But the same thing run via command maven. Below is the output of mvn -v
Apache Maven 3.8.6
Maven Home: c:\Progam Files\apache-maven-3.8.7-bin\apache-maven-3.8.6
Java version: 17.0.5, Vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk17
Intellij does seem to recognize the jdk libraries. i searched some forums and found that there should be a library called tools.jar which will help Intellij identify the jdk as jdk. but unfortuntely jdk17 does not have that. or altest my installation does not and this is an official laptop. So installing anything is pretty much not in my hands.
Any help on how to make this work in Intellij would be appreciated.