This is the C portion of the set of files that are required to allow calls directly into the operating system (Windows) from a Java class.
Java uses JNI (Java Native Interface) to access functionality that resides outside of the Java environment on the host computer. On Windows, JNI requires a Windows DLL which is written in C and compiled. This DLL contains functions that call directly into Windows. For example, to set the created date on a Windows file (an operation that is not supported in Java), the DLL would have a function with a JNI-defined signature and name, say "Java_NativeMethodsPath_setCreated" that calls a "set" function in Windows. There would also be a Java file that contains methods that correspond one-for-one with the methods in the DLL. A Java SDK-provided JNI tool links each of the Java methods to its corresponding DLL function as part of the Java compilation process.
This is the C file that compiles into a DLL file containing functions that call directly into Windows.
Copyright © 2012 Allen Baker