Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2007

Tip: Looking for answers? Try searching our database.

Where to put the dlls when using JNI

Thread view: 
bearice@gmail.com - 16 Feb 2007 15:27 GMT
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?
Sanjay - 17 Feb 2007 04:38 GMT
> 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
Chris Uppal - 17 Feb 2007 17:35 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.  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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.