I have a DLL file mostly written in vb.net It will take 2 parameters. I am suppose to make use of this DLL in my java code and pass required 2 parameters. How should I go about it?
Asked
Active
Viewed 734 times
1
-
possible duplicate of [Calling C++ dll from Java](http://stackoverflow.com/questions/9485896/calling-c-dll-from-java) & [Calling .NET DLL from Java](http://stackoverflow.com/questions/8477752/calling-net-dll-from-java) – Alex K Aug 16 '12 at 13:21
2 Answers
3
In Java there's basically two good options for this: (in order of recommendation)
- If your DLL has C function headers (rather than C++ decorations), you should use JNA. It has a simple, declarative syntax and only requires writing some Java.
- Write JNI bindings for your DLL (there'll be some Java and some C++ code involved).

Mark Elliot
- 75,278
- 22
- 140
- 160
-
Hi Mark, as I stated in my first post, DLL is a pure vb.net code. So I should go abt having JNI. Any samples you have to know wat exactly needs to be done in C++ – user1570824 Aug 16 '12 at 05:17