Fork me on GitHub
#graalvm
<
2023-05-23
>
agorgl13:05:12

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?

borkdude13:05:06

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

borkdude13:05:11

I mean their community

agorgl13:05:17

crossposted on graalvm slack, thank you

agorgl14:05:30

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