How to set the default Java version in the Project Structure in IntelliJ?

Viewed 866

I see that whenever I open a new project, the Java version in the Project Structure is automatically set to 13.

enter image description here

Currently, I go over all the modules and change their Java versions to 8. Do you know how can I make IntelliJ automatically set the Java version in the Project Structure to 13?

2 Answers

You can configure a Default Project Structure, which will be default for every new project you open/create/import in the future:

For this:

  1. First of all, I would recommend to have an updated version of your IntelliJ IDEA;
  2. Go to File → New Projects Settings → Structure for New Projects. Here you will be able to configure your default Project SDK and Project language level.

Hence, all the new projects you are going to open in IntelliJ IDEA, will, by default, have the settings you have configured.

You can apply any Java version for current project as:

File -> Project Structure -> In Project Setting select Project -> In the right side, select SDK at Project SDK; in Project language level, choose the version of Java so that IntelliJ can automatically suggest code for you.

Hope it works!

Related