We are not using these arguments in this hello-world example, but will be using them later. jobject: reference to " this" Java object.JNIEnv*: reference to JNI environment, which lets you access all the JNI functions.The dot in package name is replaced by underscore. Getting Started JNI with C Step 1: Write a Java Class HelloJNI.java that uses C Codes (For Windows) Cygwin or MinGW (Read " How to Setup Cygwin and MinGW").C/C++ and the GCC Compiler (Read " GCC and Make").I shall assume that you are familiar with: JNI is difficult, as it involves two languages and runtimes. Java supports native codes via the Java Native Interface (JNI). ![]() At times, it is necessary to use native (non-Java) codes (e.g., C/C++) to overcome the memory management and performance constraints in Java.
0 Comments
Leave a Reply. |