jdk20 in eclipse and Scoped values

Kasper Nielsen kasperni at gmail.com
Tue Mar 21 16:01:36 UTC 2023


Hi,

If you want proper Java 20 support from the Eclipse compiler.
You will have to wait on a preview patch via Marketplace.
or wait for Eclipse 23-06 to have full support for Java 20.

However, you should be able to use ScopedValue without the patch.
Make sure you have disabled "enable preview features for Java 19"
for the compiler. And set the compliance level to 19. I'm running
vanilla 2022-12 without any issues.

/Kasper

/Kasper







On Tue, 21 Mar 2023 at 15:09, Davor Hrg <hrgdavor at gmail.com> wrote:
>
> Hi,
>
> thank you for the hint. It is my first time trying preview features.
>
> Still this is only one half of my problem, I still can not get it to allow compliance level 20, only 19.
> That is even with latest milestone build I could find.
>
> It does not recognize ScopedValue.
>
> thanks,
>
> /davor
>
>
>
> On Tue, Mar 21, 2023 at 1:22 PM Kasper Nielsen <kasperni at gmail.com> wrote:
>>
>> > Is there a way to run jdk20 code in eclipse ?
>> >
>>
>> Really, the only thing you need is to run with "--enable-preview" it
>> should work out of the box.
>>
>> If you are running on the module-path add
>>    requires jdk.incubator.concurrent;
>>
>> /Kasper


More information about the loom-dev mailing list