2

I am trying to use Windows dor net Dll in my java web spring boot project.

I have dot net dll who name is operA.dll , this dll (operA.dll) uses other two dll (cmdB.dll and cmdC.dll)

Nowadays I load operA.dll using jni4net , my code to load is :

        Bridge.init();
        Bridge.LoadAndRegisterAssemblyFrom(new File(“operA.dll”));

This code works fine.

Well , after I load my dll (operA.dll) when I try to use any operation I receive
an exception (java.lang.UnsatisfiedLinkError) .

To avoid this exception I tried to use :

System.setProperty("java.library.path", "c:\libs"); and

mvn spring-boot:run -Djava.library.path=c:\libs

and copy all my dlls inside this windows directory (c:\libs) , but even son I continue to receive UnsatisfiedLinkError exception.

To test my code I developed a simple jar and configure my library path an run with Wrapper Community Edition (http://wrapper.tanukisoftware.com) and all my code run fine.

My problem is , I need to run this project (with dot net dll) inside tomcat or jetty or jboss.

How can I do this ?

Thanks for all.

Anderson Rossi
  • 493
  • 8
  • 21

0 Answers0