You have to use the JNI (JAVA Native Interface) API.
I did it a while back and I don't remember exactly how it's done but one of the things that really bothered me about it is that you have to write the function specifically for JAVA that you are calling (the function declaration is whacky too). On the java side if I remember correctly I think all you have to do is use the load library function, then after that declare the function prototype using the native keyword inside of a static block. Try at all costs to avoid using the JNI. I only recommend using it if you have to do something like OpenGL where you need really fast performance. Otherwise it's just not worth it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.