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.
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.
You can perform all native function calls simultaneously from different Java threads without the need for synchronization, just as if invoking simple Java methods. See Working with Multithreading in our Programmers Guide.
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. See Calling Native Functions in our Programmers Guide. See JNIWrapper samples
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. See Calling Conventions in our Programmers Guide.
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.
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.
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. See related samples: Access Services Remote Computer, Enum Processes Sample, Event Log Sample.
WinPack lets you listen to the file system events. You can also get file attributes, check disk space and identify the disk media type. See the File System Sample.
This demo runs on
Microsoft Windows XP or later.
By using our products or any related documentation, you accept the Terms and Conditions of the Product Licence Agreement.
Java Integration Pack comprises a complete solution for those who are looking to bridge Java with Windows technologies and tools.
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: Our licensing is based on versions of JNIWrapper. Having purchased the licence for our product you get the right to use the current major version of the product.
A: All minor version updates are free of charge. For example, if you have a licence to library version 3.x, you can receive all updates until the version 4.x is released. You can check the version of your licence in the jniwrap.lic file.
A: Upon purchase of licence you will receive a licence archive. The archive will contain two JARs: development.jar and runtime.jar. Development.jar is the licence that should be used in development process. Runtime.jar should be used to distribute your application to end users. Inside the development.jar you can find the jniwrap.lic file that contains information about your licence.
A: Major version upgrades should be purchased. You can upgrade your licence to a major version with a 25% upgrade discount. The licence upgrade includes renewal of the Standard Support pack.
A: You can distribute unlimited number of copies of your product with our library enclosed. Please use Runtime Licence for distribution of your product.
A: Runtime Licence is provided free of charge.
A: Please take a look at the Product Licence Agreement.
A: Yes, you can purchase JNIWrapper Source Code Licence; it is provided on a per developer basis. Please contact our sales team if you are interested in this option.
A: You may want to purchase a Project licence, 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 licence, which covers any number developers and projects in one company.
No. The Project licence is tied to one project only.
A: Yes, our licences are tied to a Company, not to a specific developer. You can transfer licences to other developers provided that the number of developers, working on your team equals the number of licences purchased.
We provide licences for institutions, educators, students and researchers for the duration of the project or a study.Apply You will need to submit a reference letter from your supervisor (for students) or proof of participation in research project.