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!

Using DLL functions inside Java application

843829Dec 30 2004 — edited May 18 2005
Hi,

i'm searching a solution to simply call some functions included in a DLL from a java class. After some seraches i've found the JNI solution. The solution seems to be simle when the developer creates its own DLL beacause a specific JNI header provided by javah is needed during the DLL compilation.

But the problem is that the DLL is provided alone (without sources) and can't be modified (re-compiled whit JNI header). So, that means that i have to develop my own DLL inteface including JNI headers and used to make the middle interface between my java class and the DLL.
Java Program <- > DLL interface + JNI headers <-> native DLL

Is that right ? Does it exist another simple way to do such things ?

PS:
Sorry for my english ;-)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 15 2005
Added on Dec 30 2004
22 comments
996 views