'How to enable fibers for the early release of the jdk-16 loom?

I've downloaded the early release version from https://jdk.java.net/loom/ and java starts but doing Class.forName("java.lang.Fiber") and Class.forName("java.lang.FiberScope") doesn't work. Is there a flag/jar that needs to be included?



Solution 1:[1]

It is a late answer but just to save some time, Since it is still the experimental feature you can use the same using the --enable preview flag on jshell`. Here is how I used it. enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Manish Mishra