How to set up IntelliJ IDEA to use Java 10 non-LTS version for project development?

59 Views Asked by At

I'm looking to switch the default SDK of my project in IntelliJ IDEA to Java 10 specifically. However, when I navigate to the download JDK option within IntelliJ, I notice that there's no vendor providing the non-LTS version of Java 10. Could someone guide me on how to configure IntelliJ IDEA to utilize Java 10, even though it's a non-LTS version?

enter image description here

enter image description here

My expectation is to set the current project SDK to java10, I even tried to change Language level, doesn't seem working enter image description here

I am not able to download JDK-10 from oracle.com And tried with multiple vendors, didn't find JDK-10 specifically (non-LTS), Hence "Add JDK" option is of no use too.

2

There are 2 best solutions below

0
Stefano Riffaldi On

Simply download an archive file (.zip/.tar/whatever) of JDK you want from the website of the vendor you choose (Eclipse, Amazon, Oracle, whatever), unpack it where you want, open ID, right click on your project, choose Open Modulue Settings (F4), then under Platform Settings open SDKs an click on + labeled Add SDK on top, choosing yours

enter image description here

0
6006604 On

SDKMAN!

I recommend using sdkman for downloading or switching between SDKs from your choice of multiple JDK/JRE vendors.

And then use the Add New SDK approach descibed by stefano-riffaldi.