Best practices for using the Java Native Interface

See the original posting on IBM developerWorks – Java

The Java Native Interface (JNI) is a standard Java API that enables Java
code to integrate with code written in other programming languages. JNI can be
a key element in your toolkit if you want to leverage existing code assets —
for example, in a service-oriented architecture (SOA) or a cloud-based system.
But when used without due care, JNI can quickly lead to poorly performing and
unstable applications. This article identifies the top 10 JNI programming
pitfalls, provides best practices for avoiding them, and introduces the tools
available for implementing these practices.