Which is the fastest way of calling a native library from Java?
The ones I know about are
- NativeCall – what we’re currently using
- JNA – haven’t used it, but looks reasonable
- JNI – looks horrendous to write, but we’ll do it if we get the speed
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Swig makes JNI easier too.
In terms of speed, I suspect there will be subtle variations – I strongly suggest you pick a call that you know you’ll be making a lot, and benchmark all of the solutions offered.