Click here to Skip to main content
15,902,862 members
Please Sign up or sign in to vote.
3.40/5 (2 votes)
See more:
Hello, This is Vikas Gohil.

We Are using a DLL file in VB.net as follows :

I reference the DLL file in My Application.

Then I create the Object of the DLL as follows,

Dim Obj as New DLL.Class

Then Using this object I call functions from the DLL as below,

Obj.FunctionName().

How can I use this functionality in Java OR Is it possible in the first place?

Can Anyone help me in this matter.

I am new to Java programming.

Any Help would be greatly appreciated.

Thanks In Advance.

Awaiting a reply soon.
Posted
Updated 19-Nov-10 10:57am
v2
Comments
Nagy Vilmos 2-Dec-10 12:05pm    
If you like the answer please vote.

You can load a dll using System.loadLibrary(String)[^]

The usual method is to wrap your DLL in a java class, see this example[^]
 
Share this answer
 
You want to research the Java Native Interface (JNI) which can do the same sort of thing but you will need to rewrite the DLL code. You won't be able to reuse the VB interfaces directly.

[I just realized that this issue is a few years old and shouldn't be pursued further...]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900