Problems compiling the first class with Fibers
Brian Goetz
brian.goetz at oracle.com
Mon Sep 23 18:14:45 UTC 2019
Is this your whole program? Have you imported FiberScope? If not, what it’s saying is “can’t find FiberScope in _this_ package.”
Also, you shouldn’t need —preview at all; you’re not using any preview language features here.
> On Sep 23, 2019, at 9:57 AM, bren at juanantonio.info wrote:
>
> Hi,
>
> I am build for OSX and Linux the EA for project Loom but compiling by command line a simple example, I receive a compilation error:
>
> public class FiberTest1 {
>
> public static void main(String[] args) {
>
> try (var scope1 = FiberScope.open()) {
> var fiber1 = scope1.schedule(() -> System.out.println("Hello World"));
> }
> }
>
> }
>
> javac FiberTest1.java
>
> and the response is:
>
> Error:(5, 35) java: cannot find symbol
> symbol: variable FiberScope
> location: class FiberTest1
>
> How to solve that issue?
>
> Many thanks in advance
>
> Juan Antonio
More information about the loom-dev
mailing list