Unfortunately, even the latest early-access versions of IntelliJ often do not yet support early-access versions of Java.
For example, I am trying to use Intellij 2022.1.1 Preview (Ultimate Edition) with the experimental build of Project Loom based on early-access Java 19. Installing JDK generally works with IntelliJ.
But now I want to use the Loom-specific features. When I invoke a method new in to this experimental Java 19, I get this error from compiler:
java: newVirtualThreadPerTaskExecutor() is a preview API and is disabled by default.
(use --enable-preview to enable preview APIs)
My first thought is to set the Language level fields on the File > Project Structure > Project Settings > Project and β¦ Modules panels. But apparently IntelliJ does not offer any menu items for a (Preview) mode for this early-access Java 19.
π Is there some way to make IntelliJ utilize the new preview API?
I know the error message's suggestion of --enable-preview
is meant to be a flag applied somewhere. But I don't know where.
--enable-preview
toPreferences | Build, Execution, Deployment | Compiler | Java Compiler
in theAdditional command line parameters
text field. β Maniacinstall
, I get the message "newVirtualThreadPerTaskExecutor() is a preview API and is disabled by default." with!
icon in a filled red-circle. But I went ahead with an execution β my app ran successfully! So that message seems to be superfluous. β Botello