Topic
  • 1 reply
  • Latest Post - ‏2013-12-13T22:24:04Z by AlexMulholland
T.Bussiere
T.Bussiere
4 Posts

Pinned topic How to load native libraries?

‏2013-12-12T15:37:18Z |

Hi all,

 

on WAS Liberty profile, I would like to use a jar file that need a specific dll file. I cannot change the jar file. If I copy the dll file on the java folder it works perfectly, but this solution is not acceptable.

I tried to use the java.library.path in jvm.property  => doesn't work

I tried to add the <fileset id="testFileset" dir="\temp" includes="**\mylibrary.dll"/>  in the application classloader property => doesn't work

I tried to start a new OSGI bundle containing the dll file as a Liberty feature, with the manifest defining Bundle-NativeCode: /mylibrary.dll; osname=win32; osname=win64; processor=x86; processor=x86_64 => doesn't work.

 

Any idea?

 

Thanks in advance.

  • AlexMulholland
    AlexMulholland
    32 Posts

    Re: How to load native libraries?

    ‏2013-12-13T22:24:04Z  

    Hi,

    For loading from the application you should set  -Djava.library.path=/myPath in the jvm.options file under the server directory (servers/<server_name>/jvm.options). Remember that should refer to a directory name, not the actual dll name.

    Hope this helps,

    Alex.