0

I am trying to migrate an application to native, using graalVM. This app needs a dependance for crpyto purpose. It is currently using this lib. This app is a windows one.

This lib use a DLL (pkcs11wrapper.dll) included in the jar. I am currently building the jar, then bulidong the native image using this command :

native-image -cp target\single-proxy-native-0.0.1-SNAPSHOT.jar;C:\dev\tools\m2\iaik\pkcs\pkcs11-wrapper\1.4\pkcs11-wrapper-1.4.jar fr.devboxsante.cps.nativ.NativeCpsApplication -Djava.library.path=C:\dev\

(C:\dev\ contains the right dll)

It make the exe file, but when i try to execute it, it fails :

Exception in thread "main" java.lang.UnsatisfiedLinkError: no pkcs11wrapper in java.library.path at com.oracle.svm.core.jdk.NativeLibrarySupport.loadLibraryRelative(NativeLibrarySupport.java:132) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:197) at java.lang.Runtime.loadLibrary0(Runtime.java:830) at java.lang.System.loadLibrary(System.java:1871) at fr.devboxsante.cps.nativ.NativeCpsApplication.main(NativeCpsApplication.java:15)

I have tryied a lot of things, putting the dll in the bin folder of the native jvm, adding it to the system32 folder, ... You can find the project here

Am I doing something wrong ?

Aurelien
  • 1
  • 1

0 Answers0