Skip to content

Support for use of java-server-sdk library in GraalVM native image applications #29

Open
@ketronkowski

Description

@ketronkowski

Is your feature request related to a problem? Please describe.

I currently use the launchdarkly JAVA SDK in Spring (Boot) based application. The library is currently not supported when compiling our application as a native image with GraalVM.

Describe the solution you'd like

I would like for the library to ship its JAR file with some JSON metadata in the META-INF/native-image/... directory, which enables support of dynamic features in the native image.

Describe alternatives you've considered

If it is not acceptable to include the metadata with the library, Oracle has created the graalvm-reachability-repository, which contains this metadata outside of the libraries JAR file. In an ideal world, all of the metadata is moved into the JARs of the libraries, but until our world has reached its ideal state, this repository can will be used.

the advantage of including this metadata with the library is that if your code changes, the metadata can change along with it. Otherwise, users would be broken until the graalvm-reachability-metadata is updated.

Additional context

I have tested the process of generating this metadata for the java-server-sdk library locally following instructions found here and was able to successfully build and run my application natively.

Some of the dynamic features used in the java-server-sdk need some additional configuration to allow it to be used. Please take a look at the following from GraalVM for more info on the dynamic areas

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions