What is the Difference Between JNA and JNR

As per the picture here
enter image description here

both libraries work on the same principle. But I believe there is a difference between the two. What is the difference?

+3


source to share


2 answers


JNA uses reflection to call its own methods.



JNR generates bytecode only once at runtime, so JNR is faster than JNA. See Code Generation Example here

+3


source


The presentation you linked to has already partially answered the question - so keep reading. For example. on slide 26 and ff:

Why not JNA?



  • Preprocessor constants?
  • Standard APIs are installed out of the box
  • C callbacks?
  • Performance
+1


source







All Articles