Hi, every body
i have developed a java class named A that uses another class named B , both of them is in package com.kkp ,
the class B have some native methods that implemented in B.cpp & B.h
i have used g++ for compiling the cpp file and creating a dll (B.dll).
til here every things is OK and program works fine .
i have create a jar file and the i put the B.dll, B.class and A.class in it,
the flow of jar (my library) is :
Class A be called form main application and then it calls class B methods and the native methods cause execution of B.dll functions (C++ dll) to support working on external hardware (some kind of printers).
the jar file also executes OK and no problem
the jar file manifest is
but my problem is where another application load the jar file as library and wants to execute the functions in side class A , in this state a run-time error (UnSatisfiedLinkError
) appears . i know that this error basically is because the class B count not find the B.dll in this code
i want to put my jar file in Lib folder of my application.
when i put the jar and B.dll in Lib folder the UnSatisfiedLinkError
occurs in run-time but when i put the B.dll in root directory of application it works OK and no run-time error occurs.
my question is what i must do ?, i mean that the jar file must put in Lib folder but where the B.dll must be ? (i don't want to put the dll in root of application's directory)
i know this question is maybe so simple because i have a few experience in java programming
thanks in advance.