JNIWrapper provides simplified access to native code from Java applications without using JNI. You don¿t need to create a native library to make system calls or spend time on learning the low-level ins and outs of the system architecture. You write your code in the Java language only, and JNIWrapper does the rest.
JNIWrapper provides a number of technical advantages that make the difference:
- High performance. JNIWrapper is capable of handling any large amount of data involved in interactions between the Java and native code, requiring no performance tuning on your part.
- Automatic memory management. All resources allocated by JNIWrapper are released automatically when no longer needed. You can treat JNIWrapper variables as usual Java objects that can be picked up by the Java garbage collector. Besides, JNIWrapper objects are safe with regard to finalizers: all resources are guaranteed to be available during finalization.
- Comprehensive support for native function invocation. JNIWrapper supports both stdcall and cdecl calling conventions and multiple C/C++ data types including structures, unions, and pointers. Callbacks are fully supported with any parameter and return types and both calling conventions.
- Code generation for custom parameter types. Using the Code Generator wizard bundled with JNIWrapper, you can generate Java wrappers for a required set of C types, including structures, unions, and callbacks.
- Support for thread-safe concurrent function invocation. You can perform all native function calls simultaneously from different Java threads without the need of synchronizing them, just as if invoking simple Java methods.
- Catching native errors. When you call a native function, JNIWrapper makes all native errors ready for debugging on the Java side, putting program execution fully under your control.
- Extensible architecture. You can implement new data types or customize existing ones, taking full control over the parameter behavior.
- Customizable native library search mechanism. Apart from a default mechanism to find and load a native library, JNIWrapper provides a way to customize it. Besides, it makes it possible to load native libraries from JAR files.