> Hello all,
> I'm tring to pack a dll into a jar file,but I can't load it. What can
> i do for it?
Not sure about windows, but may be you can deduce something from this.
While developing jni program on linux, i used to put by .so files
(shared library objects, which are like dynamic linked libraries) in the
LD_LIBRARY_PATH.
HTH
Sanjay
> I'm tring to pack a dll into a jar file,but I can't load it. What can
> i do for it?
DLLs are loaded by the OS (well, actually I don't think that's technically
true, but it's close enough), so the DLL has to be somewhere where the OS can
read it. JAR files don't count. You'll have to extract the DLL from the JAR
before using it.
(Or else use some really /serious/ low-level magic to extract the DLL data from
the JAR and map it directly into your Windows process's address space, do any
fixups, etc... ;-)
-- chris
Arne Vajhøj - 17 Feb 2007 23:11 GMT
>> I'm tring to pack a dll into a jar file,but I can't load it. What can
>> i do for it?
>
> DLLs are loaded by the OS (well, actually I don't think that's technically
> true, but it's close enough), so the DLL has to be somewhere where the OS can
> read it.
Yep.
> JAR files don't count. You'll have to extract the DLL from the JAR
> before using it.
>
> (Or else use some really /serious/ low-level magic to extract the DLL data from
> the JAR and map it directly into your Windows process's address space, do any
> fixups, etc... ;-)
Extracting the dll files from the jar file to disk from the running Java
code before loading them the standard way would be less magic.
Arne