After having spent 2 days on IntellijIDEA, i am totaly lost regarding the ways to configure jdks. why some many menu/places to do it ?
In fact, we have :
File | Project Structure | SDK
File | settings | Build Tools Maven | Runner | JRE
Run | Profile | edit configurations.. | Build and run
What is the usage of each one ? it is so complicated !
thanks.
File | Project Structure | SDK (and Language Level)
defines which libraries and methods you will have access to when writing the code.
Learn more
File | settings | Build Tools Maven | Runner | JRE
is for Maven only (not all Projects use Maven).
Maven is a stand-alone tool bundled with Intellij IDEA, that can build (put together) your Project for you and, optionally, run tests against it, to make sure the application works as intended.
For most cases it's fine to use the same JDK as in File | Project Structure | SDK
here.
Learn more
Run | Profile | Edit Configurations... | Build and Run
defines which JDK will be used for your application when you run it (at runtime).
Usually it's best to keep it the same as File | Project Structure | SDK
Learn more
You can easily keep all those settings at their defaults, but, if needed, IDEA gives you an option to write, build and run your application with any combination of JDKs you may need. This often can be the case for enterprise and legacy applications.