#Compiler language level settings change back

4 messages · Page 1 of 1 (latest)

brittle gust
#

whenever I change the language level to 20 (Preview) it gets changed back about 5 minutes later and i get the following error:
java: java.lang.foreign.MemorySegment is a preview API and is disabled by default.
(use --enable-preview to enable preview APIs)

I have
--enable-preview --enable-native-access=ALL-UNNAMED
options for both the compiler and the Maven runner, yet it still keeps changing back to 20 without the preview. In both .idea/compiler.xml and .idea/workspace.xml it acknowledges these options. I know that you're meant to use pom.xml to fix it instead of using the GUI since the project will just be reloaded, but what option do I use since both compilers are version 20?

fervent swallowBOT
#

This post has been reserved for your question.

Hey @brittle gust! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

brittle gust
#

also i have tried adding

<compilerArgs>
    <arg><![CDATA[--enable-preview]]></arg>
</compilerArgs>

to the pom.xml file, but that doesn't change the compiler used and this throws an error since the default compiler that doesn't support preview features doesn't allow that option (unsurprisingly)