Skip to content

Instantly share code, notes, and snippets.

@AbdoCooder
Created November 21, 2025 18:02
Show Gist options
  • Select an option

  • Save AbdoCooder/032432e67dbd3752d49e769642196903 to your computer and use it in GitHub Desktop.

Select an option

Save AbdoCooder/032432e67dbd3752d49e769642196903 to your computer and use it in GitHub Desktop.
set up your IntelliJ IDEA Ultimate project to use the JDK 25 version

You need to configure the Project Structure settings within the IDE.

Step 1: Add JDK 25 to IntelliJ IDEA

First, ensure IntelliJ IDEA recognizes the newly installed JDK: Open IntelliJ IDEA. Go to File > Project Structure (or press Ctrl+Alt+Shift+S on Windows/Linux). In the Project Structure dialog, under Platform Settings, select SDKs. Click the plus (+) icon and select Add JDK from disk.... Navigate to the installation directory of your JDK 25 (e.g., C:\Program Files\Java\jdk-25) and click OK. IntelliJ IDEA will add the JDK to its list of available SDKs. Click Apply and then OK.

Step 2: Configure the Project to Use JDK 25

Next, you need to specify that your current project should use this JDK: Open the Project Structure dialog again (File > Project Structure or Ctrl+Alt+Shift+S). Under Project Settings, select Project. In the Project SDK dropdown menu, select JDK 25 from the list of defined SDKs. In the Project language level dropdown, it is recommended to select "SDK default" (or explicitly select a specific language level like "25 - Compact source files, module imports"). Click Apply and then OK to save the project settings.

Step 3: Configure Module Language Levels (if needed)

If your project has multiple modules or you want specific modules to use different language levels: In the Project Structure dialog, go to Modules. Select the specific module(s) and go to the Dependencies tab. Ensure the Module SDK is set to "Project SDK" (which is now JDK 25) or specifically select JDK 25 from the list. Check the Sources tab to confirm the language level is correct. It typically defaults to the project's language level setting. Click Apply and OK.

Step 4: Verify Gradle/Maven Settings (if using a build tool)

If you are using Maven or Gradle, these tools can override the project settings. For Gradle: Go to File > Settings > Build, Execution, Deployment > Build Tools > Gradle and ensure the Gradle JVM is set to Project SDK or JDK 25. For Maven: Go to File > Settings > Build, Execution, Deployment > Build Tools > Maven > Importing and set the JDK for importer. Also, check the pom.xml file for any and properties to ensure they are set to 25. After completing these steps, your project will be configured to use the newly installed JDK 25.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment