dcsimg
Calling VB DLL in JAVA using JNI
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, November 18, 2003 10:24 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.clsHelloWorld 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   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.clsHelloWorld 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 using JNI

Posted By:   nishit_patel  
Posted On:   Friday, February 13, 2004 05:28 AM

I am getting error when i tries to invoke the dll in java. error is :
Exception in thread "main" java.lang.UnsatisfiedLinkError:
no prjHelloWorld.clsHelloWorld 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
About | Sitemap | Contact