2

We have early access of project loom https://jdk.java.net/loom/

But I'm not able to find an IDE(Intellij, VSCode) Compatible with this JDK to compile the code inside.

Anybody knows a way to do it?

paul
  • 12,873
  • 23
  • 91
  • 153
  • Working example and steps to solve it for your reference: https://stackoverflow.com/a/75970036/2987755 – dkb Apr 10 '23 at 04:41

1 Answers1

3

You have access to tar.gz (for non Windows OS) and ZIP (for Windows OS):

enter image description here

You have to download it, extract it and then reference in your IDE a new JRE pointing to the extracted folder.

Note however that IDE will most likely not recognize any new syntax and you will be better to use a build tool such as Maven or Gradle with Toolchain enabled to select this particular JDK 18.

NoDataFound
  • 11,381
  • 33
  • 59
  • 1
    Yeah I did that already. But I want to run a unit test using Intellij. But it seems it’s not possible yet – paul Sep 03 '21 at 08:09
  • I don't use IntelliJ, but the principle behind IntelliJ and Eclipse are no so far: you must configure the JDK for the project to be the one provided by Loom. Setting the correct Java version might also help (Java 18). In Eclipse, it could be done using Build Environment rather than explicit JRE, but you can still enforce a specific JRE while running the test. The same probably apply to IntelliJ and if you use Maven, the toolchains completely does that (you only need to use a property that specialize your JDK, eg: use a version such as 1.8.LOOM in both pom.xml and toolchains.xml). – NoDataFound Sep 03 '21 at 08:20