Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Calling multiple DLL from Java and calling same native method

843829Sep 3 2007 — edited Sep 14 2007
i have two dll files named DLL_1.dll and DLL_2.dll .
Both of them contain a native method which has a signature

JNIEXPORT void JNICALL Java_Database_Notify
(JNIEnv *, jclass);

This method is common to both the DLL
Now i load both of the DLL's using,

System.loadLibrary("DLL_1");
System.loadLibrary("DLL_2");

Both of the DLL are loaded form same Java Application

But the problem is that , whenever i try to call the Notify Method , it calls the Notify method of DLL_1 only.

How do i call the Notify Methos of second DLL(i.e DLL_2).

Is there any reference that i can get to all the DLL files when i load then , so that i can use that reference to invoke the Notify method of that particular DLL.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 12 2007
Added on Sep 3 2007
14 comments
1,032 views