Linking C code with Java: How to use the Java Native Interface
The demand for linking embedded applications to Java is increasing in order to access hardware resources. This paper covers the Java Native Interface allowing Java code that runs within a Java Virtual Machine to interact with libraries written in C, C++, and assemblylanguage. It outlines steps to write a Java application that invokes C code. It also describes how to exchange basic types, strings, and arrays between code written in Java and the native methods. In addition to accessing fields, the class introduces how to make calls to methods implemented in Java from native code (callbacks). Embedded system developers can take advantage of Java without loosing their investment in legacy code.
Please disable any pop-up blockers for proper viewing of this Whitepaper.