Changing the JDK in IntelliJ UI does not affect its Intellij terminal:

When changing the JDK, we need to remember that this only affects the JDK used by IntelliJ. Therefore, when running the Java project via the command line, it'll still use the JDK specified in the JAVA_HOME environment variable

So when running java on Intellij terminal, you still have to set JAVA_HOME to change java version

Answer from Thaiminhpv on Stack Overflow
🌐
JetBrains
jetbrains.com › help › idea › switching-boot-jdk.html
Change the boot Java runtime of the IDE | IntelliJ IDEA Documentation
February 17, 2025 - Define an SDK for each of your projects, which includes the necessary development and runtime environment. In the main menu, go to Help | Find Action… or press Ctrl+Shift+A. Find and select the Choose Boot Java Runtime for the IDE…
Discussions

Set up IntelliJ to target Java 25 or newer so it uses IO. instead of the old-school System.out. and System.in. — gotta keep things modern and efficient.
It works fine for me, make sure you set your language level Project Settings > SDK / Language Level (25) It's pretty nice, now I can just type IO.println("Hello, World!"); More on reddit.com
🌐 r/learnprogramming
2
4
October 2, 2025
How do I auto update java version and plugins?
I am not sure if there is an option for that. But i am pretty sure that You don't want to. That's how you break your project without knowing why. More on reddit.com
🌐 r/IntelliJIDEA
4
1
August 25, 2025
Tell intellij which java version to use for JUnit testing
Hi, we have a project that needs Java 8 to run. Now we have Java 16 around, so when importing Intellij uses Java 16 by default. I tried to convince Intellij to use java 8 for test execution with that: java { … More on discuss.gradle.org
🌐 discuss.gradle.org
5
0
August 16, 2022
Maybe TIL in intellij, how to configure jvm version in different project
Check out Sdkman with a .sdkmanrc that IJ generally reads and accepts More on reddit.com
🌐 r/scala
2
7
June 22, 2024
🌐
Medium
stephencowchau.medium.com › multiple-configuration-of-java-jdk-and-jre-version-in-the-project-that-might-not-align-3dfc771abc91
IntelliJ — multiple configurations of Java JDK and JRE version in the project that might not align | by Stephen Cow Chau | Medium
October 13, 2021 - Even the application properties stated the java version, IntelliJ seems to have some other configuration so that the build (JDK related, I suppose) or the run (JRE related, I suppose) are not using that specified version. ... Setting the SDK version, also setting the Project language support to be the same, I choose to use SDK default for Project language level, and in future if I need to change ...
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 14515375889170-How-to-Switch-Java-Versions-on-MacOS
How to Switch Java Versions on MacOS – IDEs Support (IntelliJ Platform) | JetBrains
October 18, 2023 - Some information on how to change the Java version in IntelliJ (might be useful for other users finding this post): - Set up the project JDK: https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk - Set java compiler version: https://www.jetbrains.com/help/idea/java-compiler.html#compiler - Set java version for Maven runner: https://www.jetbrains.com/help/idea/maven-support.html#maven_runner_jdk - Set java version for Gradle: https://www.jetbrains.com/help/idea/gradle-jvm-selection.html
Find elsewhere
🌐
JetBrains
jetbrains.com › help › idea › sdk.html
SDKs | IntelliJ IDEA Documentation
If the necessary JDK is already defined in IntelliJ IDEA, select it from the SDK list. If the JDK is installed on your computer but not defined in the IDE, select Add SDK from disk and specify the path to the JDK home directory (for example, /Library/Java/JavaVirtualMachines/jdk-12.0.1.jdk). If you don't have the necessary JDK on your computer, select Download JDK. In the next dialog, specify the JDK vendor, version, change the installation path if required, and click Download.
🌐
JetBrains
blog.jetbrains.com › home › intellij idea › java 25 lts and intellij idea
Java 25 LTS and IntelliJ IDEA - The JetBrains Blog
September 26, 2025 - You can do so from inside IntelliJ IDEA or by using tools like SDKMAN! To download a JDK from IntelliJ IDEA, open the Project Structure, go to the tab Project Settings | Project, open the drop-down menu in the SDK field, and select Download JDK.
🌐
Quora
quora.com › How-do-I-switch-between-different-versions-of-Java-in-IntelliJ-IDEA
How to switch between different versions of Java in IntelliJ IDEA - Quora
Answer: How to switch between different versions of Java in IntelliJ IDEA 1. Step 1: Installing Multiple Java Versions. Installing multiple Java versions in parallel is incredibly easy in Windows. ... 2. Step 2: Define Java Environment Variables. ... 3. Step 3: Install the Scripts to Change the ...
🌐
JetBrains
jetbrains.com
JetBrains: Essential tools for software developers and teams
JetBrains is a cutting-edge software vendor specializing in the creation of intelligent development tools, including IntelliJ IDEA – the leading Java IDE, and the Kotlin programming language.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 11611871000722-How-to-find-Java-version-of-project
How to find Java version of project – IDEs Support (IntelliJ Platform) | JetBrains
May 22, 2023 - AFAIK its different from the project sdk set in project structure, i.e, I can still clone and open a project written in java 7 and set the project sdk to java 17 - but my plugin won't work in this case. So, any suggestion on how can I check java version used in a project from a plugin?
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360007003800-How-to-specify-jdk-version-in-gradle
How to specify jdk version in gradle? – IDEs Support (IntelliJ Platform) | JetBrains
January 23, 2020 - if i m using maven in idea. just setting up "maven-compiler-plugin". and idea will using the plugin using jdk version. but, gradle, how to do it? ... Looks like an issue with the Gradle Kotlin build files. Please vote anf follow this issue for progress: https://youtrack.jetbrains.com/issue/KT-36130 · Note that the target JVM verison is still set correctly to 1.8 in Project Structure | Modules | Sources | Language level and Settings (Preferences on macOS) | Build, Execution, Deployment | Compiler | Java Compiler.
🌐
Android Developers
developer.android.com › android studio › android studio quail 1
Android Studio Quail 1 | Android Developers
1 week ago - 13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK.
🌐
Gradle
discuss.gradle.org › help/discuss
Tell intellij which java version to use for JUnit testing - Help/Discuss - Gradle Forums
August 16, 2022 - Hi, we have a project that needs Java 8 to run. Now we have Java 16 around, so when importing Intellij uses Java 16 by default. I tried to convince Intellij to use java 8 for test execution with that: java { toolchain { languageVersion = JavaLanguageVersion.of(8) } } That works fine when using run “via Gradle”: However when using Run “via Intellij IDEA”, Intellij still uses Java 16: Is this a bug in intellij or is there some other way to steer the sel...
🌐
JetBrains
jetbrains.com › help › idea › update.html
Update IntelliJ IDEA | IntelliJ IDEA Documentation
You can choose to update the current ... To manage the IntelliJ IDEA update policy, open Settings Ctrl+Alt+S and select Appearance & Behavior | System Settings | Updates....
🌐
JetBrains
jetbrains.com › help › idea › supported-java-versions.html
Supported Java versions and features | IntelliJ IDEA Documentation
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 ...
🌐
Reddit
reddit.com › r/scala › maybe til in intellij, how to configure jvm version in different project
r/scala on Reddit: Maybe TIL in intellij, how to configure jvm version in different project
June 22, 2024 -

Maybe Today I Learn in intellij how to change the jvm by project. Indeed this Ox project I wanted to try seems to need jvm 21 so I needed to switch and it generate some kind of instability in my "workflow".

When configuring the jvm in File > Project Structure > Project > SDK and the other emplacement for it are all in "default mode" (e.g : Setting > Build, Execution, Deployment > Compiler > Scala Compiler > Scala Compile Server > JDK, setting > Build, Execution, Deployment>build tools> sbt) it will be save in the .idea folder so the switch between project is now becoming easier

EDIT : the coursera course on this subject : https://www.coursera.org/projects/configure-scala-intellij

🌐
Kotlin
kotlinlang.org › multiplatform
Kotlin Multiplatform – Build Cross-Platform Apps
Enjoy smart IDE support with the KMP plugin for IntelliJ IDEA and Android Studio, with common previews, cross-language navigation, refactorings, and debugging across Kotlin and Swift code.
🌐
GitHub
docs.github.com › en › copilot › get-started › quickstart
Quickstart for GitHub Copilot - GitHub Docs
Review the generated files and select Keep to accept all the changes. The following example uses JavaScript, however other languages will work similarly.