Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to change java version in intellij

In this post, we will see how to change Java version in intellij.

Steps to change java version in intellij IDEA

Here are steps to change java version in Intellij
idea.

  1. Go to File -> Project Structure

If you prefer keyboard shortcuts:

  • Windows: Ctrl + Shift + Alt + S
  • Mac: CMD + ;

Following pop up will be displayed in intellij.

  1. Navigate to Project Setting -> SDK and add JDK.

    If you have already configured JDK, then select the JDK.

  2. Go to Project Settings -> Project and change Project SDK and Project language level to previously added java version

    Once you change the JDK version, project will start reindexing its source files and libraries to ensure all JDK features are in sync.

  3. Naviage to Project Settings -> Project and change

Did you know?

Please note that when you change java version in intellij, it will only be used by intellij. If you run the java program via command line, then it will use JAVA_HOME java version.

It won’t also change JVM used by build tools such as maven or gradle.

That’s all about how to change java version in intellij.



This post first appeared on How To Learn Java Programming, please read the originial post: here

Share the post

How to change java version in intellij

×

Subscribe to How To Learn Java Programming

Get updates delivered right to your inbox!

Thank you for your subscription

×