How to change Java JDK Version of IntelliJ IDEA.

Open IntelliJ IDEA. Then from top menu click File>Project Structure

Then you can change the values.

To see the changes are applied, you can create a class file in the project and run below code.

public class VersionChecker{

public static void main(String[] args) {
Runtime.Version myversion =Runtime.version();
System.out.println("My Java version is--"+myversion);
}
}

The output is

My Java version is — 18.0.2+9–61

No responses yet