Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change project's java version in Intellij Idea?

I reinstalled java on my laptop with different version, and after that, my project can't run well in Intellij Idea. So I want to know how to change project's java version in Intellij Idea?

like image 969
danny Avatar asked Oct 19 '25 17:10

danny


2 Answers

  1. Make sure that the compiler correctly chose the version:

    You need to go to Settings > Compiler > Java Compiler and update the Target bytecode version

    Easier: press Shift twice and type Java Compiler and will lead you to that.

  2. Setup the project SDK Go to Project Structure > Project > Project SDK and add the link to the local Java file Capture
like image 137
Adrian Muntean Avatar answered Oct 21 '25 23:10

Adrian Muntean


File | Project Structure

Add your new SDKS, and chose right sdk for your Project.

like image 41
danny Avatar answered Oct 22 '25 00:10

danny