Hi!
I know that's a lot of tutorials about JNI and smth like that but.... In my situation I have dll file but without any source so only dll (probably written in VB). So now I wrote a code looks like this:
----------------------------------------------------------
public class Hello {
public native void printHello();
static {
System.loadLibrary("hello");
}
public Hello() {
}
public static void main(String[] args) {
// TODO code application logic here
Hello h = new Hello();
for(int i = 0; i<=900; i++)
h.printHello();
}
}
---------------------------------------------------------
Then I have error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: printHello
at javaapplication9.Hello.printHello(Native Method)
at javaapplication9.Hello.main(Hello.java:40)
-------------------------------------------------
Why errors has occured? I don't know if I can do that, or better I should do like this: Java -> wrapper class(written in C++) -> my dll file
So please advise me what I should to do (some samples would be nice
Thanks for any response
Best regards
Bartec
I know that's a lot of tutorials about JNI and smth like that but.... In my situation I have dll file but without any source so only dll (probably written in VB). So now I wrote a code looks like this:
----------------------------------------------------------
public class Hello {
public native void printHello();
static {
System.loadLibrary("hello");
}
public Hello() {
}
public static void main(String[] args) {
// TODO code application logic here
Hello h = new Hello();
for(int i = 0; i<=900; i++)
h.printHello();
}
}
---------------------------------------------------------
Then I have error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: printHello
at javaapplication9.Hello.printHello(Native Method)
at javaapplication9.Hello.main(Hello.java:40)
-------------------------------------------------
Why errors has occured? I don't know if I can do that, or better I should do like this: Java -> wrapper class(written in C++) -> my dll file
So please advise me what I should to do (some samples would be nice
Thanks for any response
Best regards
Bartec