© Kishori Sharan 2018
Kishori SharanJava APIs, Extensions and Librarieshttps://doi.org/10.1007/978-1-4842-3546-1_7

7. Java Native Interface

Kishori Sharan1 
(1)
Montgomery, Alabama, USA
 
In this chapter, you will learn:
  • What the Java Native Interface (JNI) is

  • How to write Java programs that use native methods

  • How to write C++ programs to implement native methods

  • How to create a shared library on Windows and Linux for the native implementation of methods used in Java

  • The data type mapping between Java types and JNI types

  • How to work with Java strings and arrays in native code

  • How to create Java objects, access fields, and methods of those objects in native code

  • Exception handling in native code

  • How to embed the JVM in native code

  • How to handle thread synchronization ...

Get Java APIs, Extensions and Libraries: With JavaFX, JDBC, jmod, jlink, Networking, and the Process API now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.