[graalvm-users] java.lang.Thread.sleep() supported in GraalVM?

Eric Samson erix.samson at gmail.com
Mon Oct 16 16:38:16 UTC 2023


Hi everyone,

I'm totally new to GraalVM.
I've set up the whole environment for Windows this morning.

I'm now trying to natively compile a Groovy app (with neither dynamic nor
meta programming).
I've been able to compile it and use the native-image-agent to generate the
/conf files.

Now I'm trying to generate the executable and I get an error message due to
the fact I'm using Thread.sleep(x) in my main loop.

Sleep is a static method of the Thread class. I understand there must be
some kind of conflicts between the class being initialized at build-time or
runtime. But I'm not sure how to fix it. I've spent a lot of time in the
GraalVM documentation and several Web sites (stackOverflow, etc.) but could
not find a good example of how to use Thread.sleep in GraalVM.

Sorry for the noob question. Any hint would be greatly appreciated. Thanks
in advance.
Best regards, Erix.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://oss.oracle.com/pipermail/graalvm-users/attachments/20231016/0f89bb69/attachment.html>


More information about the GraalVM-Users mailing list