Hi guys, with simple five steps you can do Java JNI programs. Let's start with what is JNI?
JNI
- The Java™ Native Interface (JNI) is a powerful feature of the Java platform.
- Applications that use the JNI can incorporate native code written in programming languages such as C and C++, as well as code is written in the Java programming language.
- The JNI allows programmers to take advantage of the power of the Java platform, without having to abandon their investments in legacy code.
- Because the JNI is a part of the Java platform, programmers can address interoperability issues once and expect their solution to work with all implementations of the Java platform.
Installation
- Install JAVA recent JDK in your local machine
- Install an IDE which is comfortable for you eg: Netbeans, Eclipse, JetBrains
- Install cross compiler which will help to integrate two different platforms. eg: Cygwin
Steps to do JNI Programs
- Create new java project in NetBeans. File --> New Project --> java application and declare the native methods. Here addingSum is the native method its definition will available in C Project.








Hello Lavanya,
ReplyDeleteThis is Sachin. I was going thru your both blogs and would like to discuss something which you might be interested in. Kindly prompt me on my email address in case you see my message and would like to contact me.
E-Mail= srivastavasachin120@gmail.com