Calling VB dll in JAVa
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, November 18, 2003 10:18 PM

I am getting error when i tries to invoke the dll in java. error is : Exception in thread "main" java.lang.UnsatisfiedLinkError: no prjHelloWorld.clsH elloWorld in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1403) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at HelloWorldVB. (HelloWorldVB.java:7) Java Code class HelloWorldVB { private native void Add(int x,int y); public static void main(String[] args) { new HelloWorldVB().Add(2,5); } static { System.loadLibrary("prjHelloWorld.clsHelloWorld"); } }    More>>

I am getting error when i tries to invoke the dll in java.
error is :
Exception in thread "main" java.lang.UnsatisfiedLinkError: no prjHelloWorld.clsH
elloWorld in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1403)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:832)
at HelloWorldVB. (HelloWorldVB.java:7)




Java Code

class HelloWorldVB {
private native void Add(int x,int y);
public static void main(String[] args) {
new HelloWorldVB().Add(2,5);
}
static {
System.loadLibrary("prjHelloWorld.clsHelloWorld");
}
}

VB Code

projectname: prjHelloWorld.prj
classname : clsHelloWorld.cls
DLL Name : prjHelloWorld.dll

Public Sub Add(x As Integer, y As Integer)
Debug.Print x + y
End Sub

   <<Less

Re: Calling VB dll in JAVa

Posted By:   Pavan_Shanbhag  
Posted On:   Tuesday, December 16, 2003 09:48 PM

Hi instead of specifyig the full name of the dll just say
System.loadLibrary("Helloworld");

and also make sure that the directory where ur dll resides is added to your PATH environment on windows...

Rgds/Bye
About | Sitemap | Contact