graalvm

agorgl 2023-05-23T13:46:12.200909Z

I'm building a graalvm binary that has a dependency in pty4j and I'm getting this:

Exception in thread "main" java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/linux-x86-64/libjnidispatch.so) not found in resource path ()
I tried adding
"-H:IncludeResources=\"com/pty4j/native/*\""
                   "-H:IncludeResources=\"com/sun/jna/*\""
to my native-image build command, but no luck. Any ideas?

borkdude 2023-05-23T13:47:06.478099Z

Maybe you need a JNI config, perhaps best to ask this on the graalvm slack

borkdude 2023-05-23T13:47:11.863549Z

I mean their community

agorgl 2023-05-23T13:59:17.636129Z

crossposted on graalvm slack, thank you

agorgl 2023-05-23T14:13:30.690689Z

I found out that the quotes are not needed, so just

"-H:IncludeResources=com/sun/jna/.*"
gets me to the next error:
JNA: Problems loading core IDs: java.lang.Object
java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: Unsupported JNI version 0x0, required by /home/user/.cache/JNA/temp/jna10412583019841892782.tmp