Java Native Interface
JNI is a standard programming interface used to solve following problems.
- Write Java native methods.
- Embedding Java Virtual Machine(JVM) into native application.
Java native Methods:
Java native methods allow programmers to write methods in some other programming languages, such as C , C++ etc. Use case for native methods are as following.- Use certain system functionality that can't be done using pure java.
- Get performance mileage by implementing performance sensitive methods in native over pure java.
Embedding JVM into native application:
There are certain cases when we require to call existing Java methods in our native code. This is achieved by embedding JVM into our native application.Follow the link for sample code. Embed JVM in native C code
No comments:
Post a Comment