I think JNA copies it's jnidispatch.dll to the temp folder before loading it
in. Maybe do that?
Paul.
On Mon, Sep 1, 2008 at 11:43 AM, Jiang, Hongyi <jia...@ugs.com> wrote:
Hi everyone,
I have an executable jar file, which calls a DLL file. I can access the
DLL file using following code:
* *
*public* *interface* License *extends* Library {
*public* License *INSTANCE* = (License)Native.*loadLibrary*(
".\\Prop\\License.dll", License.*class*);
*void* checkLicense(*byte*[] pszLicEnc, *byte*[] pszLicReturnEnc,
*int*iBlockLength);
}
However, I don't want to deploy this DLL file outside of this executable
Jar.
Can anybody tell me, how to write the code to access this DLL file, which
is deployed to a Jar file.
I have tried the following code, It works in Eclipse, but it doesn't work,
if I double click the Jar file.
public License INSTANCE = (License)Native.loadLibrary(new
File(Main.class.getResource("*cfg*/*lang*/License.*dll*").toURI()).getAbsolutePath(),
License.class);
Thanks
Hognyi