Davide Cerbo
Davide Cerbo

Reputation: 363

Check java library compatibility with GraalVM

I'm studying GraalVM and I would like to try to use some library that I use in my project. There is some tool that can check the whole code and give me a report about code not compatible with GraalVM native image?

Thanks in advance, Davide

Upvotes: 4

Views: 575

Answers (1)

vjovanov
vjovanov

Reputation: 120

It would be hard and misleading to build a tool that works for any given JVM library without the application in which this library is used. The reason is that support of a library depends on two major things: (1) which functions in the library are used, and (2) which static initializers are executed during image generation as opposed to image runtime.

GraalVM native-image itself will report features that are currently not supported in all of the reachable code on the classpath. The error reporting mechanism of native-image should provide enough information about the unsupported features that allows the user to fix them.

native-image should be used in conjunction with the native-image-configure tool that generates configuration files necessary for configuring the native-image tool for a given project.

Upvotes: 4

Related Questions