Recommendations for upgrading to Java 17 for 2022.2


Are there any best practices or recommendations on how to upgrade to Java 17, specifically on how to support older versions?

If I switch to Java 17 now I guess the same build will not be supported by 2022.1 and older? Do I have to publish multiple versions of the plugin? Can I just continue using Java 11 and just build it in gradle using 17 or what?

Comment actions Permalink

Hi Simon,

You are correct. You can't use a higher Java version than the one supported in an IDE.

You can use Java 11 for your plugin and run it in IDEs run on Java 17.

You can also use a newer JDK for Gradle. Just remember to configure the Java compilation tasks in your Gradle build script to use Java 11 if you want to target IDEs run on Java 11:

tasks {
// Set the JVM compatibility versions
withType<JavaCompile> {
sourceCompatibility = "11"
targetCompatibility = "11"


Comment actions Permalink

Hi Karol,

That's great. Java 11 is enough for me for now. I may switch at some point when 2022.2 is established. Thanks for the quick response.


Please sign in to leave a comment.