Suppose that there is an existing application, written in C, that monitors conditions on a factory floor, and you need to incorporate this functionality into a Java application.
The traditional approach using JNI involves Java and C developers as well as management coordination to keep the functionality synchronized.
By contrast, using JNIWrapper is trivial and saves time and efforts dramatically.
JNIWrapper can handle large amounts of data involved in interactions between the Java and native code, with no tuning on your side.
You can implement new data types or customize existing ones, taking full control over the parameter behavior.
In addition to a default mechanism for finding and loading a native library, JNIWrapper provides a way to customize the library. Also, it's possible to load native libraries from JAR files.
All resources allocated by JNIWrapper are released automatically when no longer needed. You can treat JNIWrapper variables as ordinary Java objects that can be reclaimed by the Java garbage collector. Besides, JNIWrapper objects are safe with regard to finalizers: all resources are guaranteed available during finalization.
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.
You can perform all native function calls simultaneously from different Java threads without the need for synchronization, just as if invoking simple Java methods.
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.
When you call a native function, JNIWrapper makes all native errors ready for debugging on the Java side, putting program execution completely in your hands.
When you purchase JNIWrapper you receive WinPack, a free add-on enabling access to the Windows native API and libraries from Java code. WinPack provides several integration features to make your Java application look and behave like a Win32 citizen. WinPack requires no extensive knowledge of the Win32 API, nor any writing of cumbersome wrapper classes for JNI.
With WinPack, you can use familiar Windows dialog boxes and modify window properties however you choose.
With just a snippet of code you can make your Java application read, write or delete the Windows registry keys and values. Most of the major data types are supported.
Using the Services API, you can start, stop or delete a service, display all running services in a list, and change the service options. WinPack lets you monitor and manage system processes, modules, memory and event logs.
WinPack lets you listen to the file system events. You can also get file attributes, check disk space and identify the disk media type.
By using our products or any related documentation, you accept the Terms and Conditions of the Product License Agreement.
A: Please make sure that you set the correct function calling convention. The defaults are: stdcall for Windows as it is used by most of the Windows API, and cdecl for Linux - it is used by almost all libraries.
A: JNIWrapper is not designed for integration with .NET libraries which were created using C# or any other .NET programming language. In fact such libraries have architecture which completely differs from regular Win DLL libraries. Nevertheless it is possible to integrate with a .NET library if it provides COM Interop level. In this case you can use our ComfyJ product for that.
A: Technically it’s possible to invoke the functions from such library using JNIWrapper, but it won’t give you the ability to work with C++ objects and their methods. There are two possible workarounds. First is to create the plain C wrapper functions for the required C++ functions from that library. Second one is to enable COM interop in that C++ library and then use our ComfyJ product for integration with it.
A: The simplest way is to package all required library files (including JNIWrapper libraries) to root folder of an application JAR file.
A: The simplest way is to package that file to the \META-INF\ subdirectory of an application JAR file.
A: Yes, you can use Codegen for JNIWrapper utility application to generate the corresponding Java wrapper for it.
A: You can distribute unlimited number of copies of your product with our library enclosed. Please use Runtime License for distribution of your product.
A: Runtime License is provided free of charge.
A: Please take a look at the Product License Agreement.
A: Yes, you can purchase JNIWrapper Source Code License; it is provided on a per developer basis. Please contact our sales team if you are interested in this option.
A: Upon purchase of license you will receive a license archive. The archive will contain two JARs: development.jar and runtime.jar. Development.jar is the license that should be used in development process. Runtime.jar should be used to distribute your application to end users.
A: You may want to purchase a Project license, which is more cost-effective in case there are 3 and more developers on the team.
A: The best solution would be to purchase the Unlimited license, which covers any number developers and projects in one company.
No. The Project license is tied to one project only.
A: Yes, our licenses are tied to a Company, not to a specific developer. You can transfer licenses to other developers provided that the number of developers, working on your team equals the number of licenses purchased.
Sébastien GemmeWe actually purchased a license and we are very happy with the product: great job! This product saves us time since I don't have to write the JNI layer myself.
Canadian Space Agency
Stephen Renner...I have been very impressed with the amount of functionality provided as well as stability and robustness of the product…
Adam AcottI am very satisfied with the product as I find the abstraction to the JNI functionality of Java to be quite useful.
Novex Software Development Inc.
Hector Zendejas...my brief experience with your product, considering my previous experience with JNI, has been highly satisfactory. I have developed in a weekend what took me two weeks at least using other tools.