Providers get information from and set information on managed devices. A native provider is a program specifically written for a particular managed device. For example, a provider that accesses data on a Solaris system usually includes C functions to query the system.
The common reasons for writing a native provider are as follows:
Efficiency – You may want to implement a small portion of time-critical code in a lower-level programming language, such as Assembly, and then have your Java application call these functions.
Need to access platform-specific features – The standard Java class library might not support the platform-dependent features required by your application.
Legacy code – You want to continue to use your legacy code with a Java provider.
The Java Native Interface is part of the JDK software. By writing programs using the Java Native Interface, you ensure that your code is completey portable across all platforms.The Java Native Interface enables Java code that runs within a Java virtual machine to operate with applications and libraries written in other languages, such as C, C++, and assembly.
For more information on writing and integrating Java programs with native methods, visit the Java Web site at http://java.sun.com.