如何在IntelliJ的项目结构中设置默认的Java版本?

huangapple go评论58阅读模式
英文:

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

问题

我注意到每当我打开一个新项目时,项目结构中的Java版本会自动设置为13。

目前,我会逐个浏览所有的模块并将它们的Java版本更改为8。您知道如何让IntelliJ自动将项目结构中的Java版本设置为13吗?

英文:

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

如何在IntelliJ的项目结构中设置默认的Java版本?

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?

答案1

得分: 4

你可以配置一个默认项目结构,该结构将适用于将来您打开/创建/导入的每个新项目:

为此:

  1. 首先,我建议您拥有最新版本的IntelliJ IDEA;
  2. 转到 File → New Projects Settings → Structure for New Projects。在这里,您将能够配置您的默认项目SDK项目语言级别

因此,您在IntelliJ IDEA中打开的所有新项目将默认使用您配置的设置。

英文:

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.

答案2

得分: 1

你可以为当前项目应用任何Java版本:

文件 -> 项目结构 ->项目设置 中选择 项目 -> 在右侧,选择 SDK项目SDK 处;在 项目语言级别 中,选择 Java版本,这样IntelliJ就可以自动为您提供代码建议。

希望能起作用!

英文:

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!

答案3

得分: 0

在IntelliJ IDEA 2023.1.3版本中设置默认项目SDK的位置是 File / New Projects Setup / Structure / Project Settings / Project /

英文:

The place to set default project SDK in IntelliJ IDEA version 2023.1.3 is File / New Projects Setup / Structure / Project Settings / Project /:
如何在IntelliJ的项目结构中设置默认的Java版本?

huangapple
  • 本文由 发表于 2020年8月17日 16:00:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/63446850.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定