Monday, 25 April 2016

What is JNI and its advantages and disadvantages ?


JNI (Java Native Interface)

JNI is used to call functions written in other languages than Java.

Advantages
  • Use existing libraries which was written in other language
  • Call Windows API function
  • Maintains execution speed
  • Call API function of some server product which is in C or C++ from Java client.

Disadvantage
  • Can't say write once run anywhere
  • Difficult to debug runtime error in native code
  • Potential security risk
  • Can't call it from an Applet

No comments:

Post a Comment

Note: only a member of this blog may post a comment.