Как поменять версию java в intellij idea
Перейти к содержимому

Как поменять версию java в intellij idea

  • автор:

Change the boot Java runtime of the IDE

As a Java application, IntelliJ IDEA requires a Java runtime environment (JRE). By default, IntelliJ IDEA uses JetBrains Runtime (a fork of OpenJDK), which is included with the IDE. JetBrains Runtime fixes various known OpenJDK and Oracle JDK bugs, and provides better performance and stability. However, in some cases you may be required to use another Java runtime or a specific version of JetBrains Runtime.

Changing the boot Java runtime may cause unexpected problems. Do not change it unless you were specifically asked to do so by JetBrains support.

The runtime for IntelliJ IDEA is not the same runtime used for your applications. Define an SDK for each of your projects, which includes the necessary development and runtime environment.

Switch the Java runtime used to run IntelliJ IDEA

  1. Go to Help | Find Action or press Control+Shift+A .
  2. Find and select the Choose Boot Java Runtime for the IDE action.
  3. Select the new desired runtime and click OK . If necessary, you can change the location where IntelliJ IDEA will download the selected runtime.
  4. Wait for IntelliJ IDEA to restart with the new runtime.

When you open the Choose Boot Runtime for the IDE dialog for the first time, it may take a while to load the list of JetBrains Runtime builds from the server.

Choose Boot Runtime for the IDE

To use a different Java runtime available on your computer, select Add Custom Runtime… under Advanced in the New field. IntelliJ IDEA lists all the JDKs and JREs that it was able to detect. Select one or click Add JDK to specify the location of the desired Java home directory.

To reset back to the default runtime that the IDE initially used, click Use Default Runtime .

When using a non-default Java runtime for IntelliJ IDEA, it will not update with the IDE and may not be compatible with the new version. Reset back to the default runtime when updating IntelliJ IDEA to get the latest compatible version of JetBrains Runtime.

The path to the selected runtime is stored in the idea.jdk or idea64.jdk file in the IntelliJ IDEA configuration directory. If there are problems with the selected runtime, you can delete this file to revert to the default runtime.

You can also override the runtime used for IntelliJ IDEA by adding the IDEA_JDK environment variable with the path to the desired JDK home directory.

Смена версии java в intellij idea

@АлексейШиманский, если я правильно Вас понял, то второе. Я имею ввиду, импорт классов. Ибо даже при попытке создать ‘JavaFX application’ все импортированные классы подсвечены красным.

30 авг 2017 в 16:03
@Андрей правте ваш вопрос на основе комментариев.
30 авг 2017 в 16:27
Для каждого проекта надо менять версию jdk?
9 ноя 2021 в 7:32

1 ответ 1

Сортировка: Сброс на вариант по умолчанию

Если я правильно понял, то.

Попробуй в начале установить верную версию JDK в проект. Это описано в вопросе Не компилируется Java программа в IntelliJ Idea.

После установки (или если уже все и так было проделано), то зайди:

Project Structure → Project Settings → Project → Project language level и выбрать подходящий под проект уровень.

введите сюда описание изображения

Отслеживать
ответ дан 30 авг 2017 в 16:09
Алексей Шиманский Алексей Шиманский
71.1k 12 12 золотых знаков 90 90 серебряных знаков 180 180 бронзовых знаков
Спасибо! Оказывается, в project sdk стояла 1.7.
30 авг 2017 в 16:13

  • java
  • intellij-idea
    Важное на Мете
Связанные
Похожие

Подписаться на ленту

Лента вопроса

Для подписки на ленту скопируйте и вставьте эту ссылку в вашу программу для чтения RSS.

Дизайн сайта / логотип © 2023 Stack Exchange Inc; пользовательские материалы лицензированы в соответствии с CC BY-SA . rev 2023.10.27.43697

Нажимая «Принять все файлы cookie» вы соглашаетесь, что Stack Exchange может хранить файлы cookie на вашем устройстве и раскрывать информацию в соответствии с нашей Политикой в отношении файлов cookie.

Изменение версии Java в Idea

Смена версии JRE в IntelliJ IDEA
Недавно столкнулся с проблемой, у меня в IDEA не работает добавление нового компонента в palette .

Определение версии Java и версии браузера
Поступила интересная задача. Есть необходимость получать, оперативно, от клиента информацию о.

Java IDEA + h2
Всем доброго. В IntelliJ IDEA делаю подключение к БД H2 (h2-1.3.176) при запуске в самой idea все.

Java intellij idea
Здравствуйте. Буду рад ответу, как в intelij idea найти класс system? И еще, в java все библиотеки.

Автоматизируй это!

Эксперт Python

7540 / 4556 / 1206
Регистрация: 30.03.2015
Сообщений: 13,118
Записей в блоге: 29

UltraHybrid, а там разве если нажать на выпадающий список Project Language Level (чуть ниже того, что на скрине) нельзя выбрать версию нужную?

Supported Java versions and features

This page lists all Java versions and preview features supported by IntelliJ IDEA for developing applications. For more information about Java releases and features in each release, refer to Java version history.

If you need to run IntelliJ IDEA using another Java runtime, refer to Change the boot Java runtime of the IDE for instructions.

IntelliJ IDEA 2023.X

LTS versions

  • Java 17: Sealed types, always-strict floating-point semantics
  • Java 11: Local-variable syntax for lambda parameters
  • Java 8: Lambdas, type annotations, etc.

Other versions

IntelliJ IDEA 2023.2

  • Java 20 Standard language features:
    • No new language features
    • Record patterns (second preview)
    • Pattern matching for switch (fourth preview)
    • No new language features
    • Record patterns
    • Pattern matching for switch (third preview)

    IntelliJ IDEA 2023.1

    • Java 20 Standard language features:
      • No new language features
      • Record patterns (second preview)
      • Pattern matching for switch (fourth preview)
      • No new language features
      • Record patterns
      • Pattern matching for switch (third preview)
      • No new language features
      • Pattern matching for switch (second preview)
      • Sealed types
      • Always-strict floating-point semantics

      IntelliJ IDEA 2022.X

      LTS versions

      • Java 17: Sealed types, always-strict floating-point semantics
      • Java 11: Local-variable syntax for lambda parameters
      • Java 8: Lambdas, type annotations, etc.

      Other versions

      IntelliJ IDEA 2022.3

      • Java 19 Standard language features:
        • No new language features
        • Record patterns
        • Pattern matching for switch (third preview)
        • No new language features
        • Pattern matching for switch (second preview)
        • Sealed types
        • Always-strict floating-point semantics

        IntelliJ IDEA 2022.2

        • Java 19 Standard language features:
          • No new language features
          • Record patterns
          • Pattern matching for switch (third preview)
          • No new language features
          • Pattern matching for switch (second preview)
          • Sealed types
          • Always-strict floating-point semantics

          IntelliJ IDEA 2022.1

          • Java 18 Standard language features:
            • No new language features
            • Pattern matching for switch (second preview)
            • Sealed types
            • Always-strict floating-point semantics
            • Pattern matching for switch
            • Records
            • Patterns
            • Local enums and interfaces

            IntelliJ IDEA 2021.X

            IntelliJ IDEA 2021.3

            • Java 6
            • Java 7
            • Java 8
            • Java 9
            • Java 10
            • Java 11
            • Java 12: no new language features
            • Java 13: no new language features
            • Java 14: Switch expressions
            • Java 15: Text blocks

            Java 16 standard language features:

            • Records
            • Patterns
            • Local enums and interfaces

            Java 16 preview features:

            Java 17 standard language features:

            • Sealed types
            • Always-strict floating-point semantics

            Java 17 preview features:

            IntelliJ IDEA 2021.2

            • Java 6
            • Java 7
            • Java 8
            • Java 9
            • Java 10
            • Java 11
            • Java 12: no new language features
            • Java 13: no new language features
            • Java 14: Switch expressions
            • Java 15: Text blocks

            Java 15 preview features:

            Java 16 standard language features:

            • Records
            • Patterns
            • Local enums and interfaces

            Java 16 preview features:

            Java 17 standard language features:

            • Sealed types
            • Always-strict floating-point semantics

            Java 17 preview features:

            IntelliJ IDEA 2021.1

            • Java 6
            • Java 7
            • Java 8
            • Java 9
            • Java 10
            • Java 11
            • Java 12: no new language features
            • Java 13: no new language features

            Java 14 standard language features:

            Java 15 standard language features:

            Java 15 preview features:

            Java 16 standard language features:

            • Records
            • Patterns
            • Local enums and interfaces

            Java 16 preview features:

            For more information, refer to the Java 16 and IntelliJ IDEA blog post.

            IntelliJ IDEA 2020.X

            IntelliJ IDEA 2020.3

            • Java 6
            • Java 7
            • Java 8
            • Java 9
            • Java 10
            • Java 11
            • Java 12: no new language features
            • Java 13: no new language features

            Java 14 standard language features:

            Java 14 preview features:

            Java 15 standard language features:

            Java 15 preview features:

            For more information, refer to the Java 15 and IntelliJ IDEA blog post.

            IntelliJ IDEA 2020.2

            • Java 6
            • Java 7
            • Java 8
            • Java 9
            • Java 10
            • Java 11
            • Java 12: no new language features
            • Java 13: no new language features

            Java 14 standard language features:

            Java 14 preview features:

            Java 15 standard language features:

            Java 15 preview features:

            For more information, refer to the Java 15 and IntelliJ IDEA blog post.

            IntelliJ IDEA 2020.1

            • Java 1.3
            • Java 1.4
            • Java 5
            • Java 6
            • Java 7
            • Java 8
            • Java 9
            • Java 10
            • Java 11
            • Java 12: no new language features
            • Java 13: no new language features

            Java 13 preview features:

            Java 14 standard language features:

            Java 14 preview features:

            For more information, refer to the Java 14 and IntelliJ IDEA blog post.

            IntelliJ IDEA 2019.X

            IntelliJ IDEA 2019.3

            • Java 1.3
            • Java 1.4
            • Java 5
            • Java 6
            • Java 7
            • Java 8
            • Java 9
            • Java 10
            • Java 11
            • Java 12: no new language features
            • Java 13: no new language features

            Java 13 preview features:

            For more information about Java 13 support in IntelliJ IDEA 2019.3, refer to the Java 13 and IntelliJ IDEA blog post.

            IntelliJ IDEA 2019.2

            • Java 1.3
            • Java 1.4
            • Java 5
            • Java 6
            • Java 7
            • Java 8
            • Java 9
            • Java 10
            • Java 11
            • Java 12: no new language features
            • Java 13: no new language features

            Java 13 preview features:

            IntelliJ IDEA 2019.1

            • Java 1.3
            • Java 1.4
            • Java 5
            • Java 6
            • Java 7
            • Java 8
            • Java 9
            • Java 10
            • Java 11
            • Java 12: no new language features
            • Java 12 Switch expressions (preview feature)

            For more information, refer to:

            • Live Webinar: Java 12 in IntelliJ IDEA
            • Java 12 and IntelliJ IDEA

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *