JNI with VB DLL
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Akhilesh_Mahto
Posted On:   Monday, August 13, 2001 02:33 AM

Hi,


When i try to call a method of my VB code which in fact is an ActiveX DLL i get java.lang.UnsatisfiedLinkError.


Can any body help me on the same.


Secondly is it possible to use the VB Dll's from Java using JNI because all the examples i have found till now in the inetrnet is using JNI for C/C++ code.



Thanx in advance


Akhil

Re: JNI with VB DLL

Posted By:   Michael_Jensen  
Posted On:   Thursday, August 23, 2001 08:11 PM

Hi Akhil,


I'm afraid that you cannot call any methods from an ActiveX DLL created in VB. The way that JNI works is first you define your Java method to be native. Therefore, the compiler knows that this method will be making a call to a library other than Java.


You then run javah -jni on your class to generate a C header file. Now that you have the header file, you can create a DLL in C/C++ that contains the specified method.

Check out the tutorial on the sun site ... it's quite helpful.

I hope that helps!
Mike

About | Sitemap | Contact