Clear API & Docs

Extensive documentation
and dozens of examples.

Prompt support

Get reply from JNIWrapper engineers within one business day on the support site or premium support service.

Proven expertise

Created by engineers who have been integrating Java with MS IE, Firefox, WebKit, Safari, and Chromium for 20 years.

Simple integration

Function call sample

  • /.../
    • /*
    •  * Copyright (c) 2000-2024 TeamDev Ltd. All rights reserved.
    •  * TeamDev PROPRIETARY and CONFIDENTIAL.
    •  * Use is subject to licence terms.
    •  */
  •  
  • import ...
    • import com.jniwrapper.AnsiString;
    • import com.jniwrapper.Function;
    • import com.jniwrapper.Int;
    • import com.jniwrapper.Pointer;
  •  
  • /**...*/
    • /**
    •  * This class demonstrates how to invoke native functions from dynamic-link libraries (DLL) using
    •  * the {@link Function} class.
    •  */
  • public class FunctionCallSample extends BasicJNIWrapperSample {...
    •  
    • /**
    •  * This method invokes the sumStdCall native function using the STDCALL calling convention.
    •  */
    • public static void returnValueSample() {...
      • int a = 10, b = 100;
      • Function add = SAMPLE_LIB.getFunction("sumStdCall");
      • Int result = new Int();
      • add.invoke(result, new Int(a), new Int(b));
      • System.out.println("The sum of a = " + a + " and b = " + b + " is " + result.getValue());
      }
    •  
    • /**
    •  * This method invokes the printStringCdeclCall native function using the CDECL calling convention.
    •  * printStringCdeclCall prints the specified string to the standard output stream on the native side.
    •  */
    • public static void noReturnValueStdCallSample() {...
      • String str = "This string was put to the out stream in printStringCdeclCall native function.";
      • Function putString = SAMPLE_LIB.getFunction("printStringCdeclCall");
      • putString.setCallingConvention(Function.CDECL_CALLING_CONVENTION);
      • putString.invoke(null, new Pointer(new AnsiString(str)));
      }
    •  
    • public static void main(String[] args) {...
      • returnValueSample();
      • noReturnValueStdCallSample();
      }
    }
  •  

How to save money and time with JNIWrapper

Save money and time with JNIWrapper

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.

Save money and time with JNIWrapper
Save money and time with JNIWrapper

Features

High-Performance

JNIWrapper can handle large amounts of data involved in interactions between the Java and native code, with no tuning on your side.

Automatic memory management

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.

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. See Calling Native Functions in our Programmers Guide. See JNIWrapper samples

Extensible architecture

You can implement new data types or customize existing ones, taking full control over the parameter behavior. See Structures and Unions in our Programmers Guide. See also the related samples: Union Sample, Union Structure.

Thread-safe concurrent function invocation

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.

Custom search mechanism

In addition to a default mechanism for finding and loading a native library, JNIWrapper provides a way to customize the library loading. Also, it’s possible to load native libraries from JAR files.

Code generation wizard

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.

WinPack

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.

Dialog boxes

With WinPack, you can use familiar Windows dialog boxes and modify window properties however you choose. See the following samples: Choose Color Dialog, Select Folder Dialog, Open/Save File Dialog.

Services, processes and event Logs

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.

Access to the registry

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. See the following samples: Registry Key Set Values, Registry Key Enum Values.

Events and file management

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.

Examples of apps our customers build

Rich Java client applications.

JNIWrapper provides easy access to OS features and resources, such as native windows and dialogs, system registry, hooks, shell resources, etc. The library allows using any platform functions without writing additional (JNI) wrappers.

Java libraries for integration with native SDKs.

JNIWrapper’s Code Generator creates wrappers for native C types from an SDK. This makes Java development routine more efficient.

Integration with native legacy applications.

JNIWrapper allows Java applications to interoperate with native applications and libraries written in different programming languages, such as C/C++, Pascal, ASM, etc.

Cross-platform Java integration solutions

which can be built on top of existing cross-platform native libraries. This is made possible due to JNIWrapper support of various operating systems and platforms.

Plug-ins and add-ons written in Java

for various integration scenarios which is possible with great JNIWrapper’s performance and its native memory management.

Getting help

Contact support

During evaluation period please use the email address, provided to you in the evaluation email.

If you have an active support subscription, please use the email address, provided to you in the email confirming the license purchase.

Evaluation Support

Provided for 30 days

Standard Support

Provided for one year with 25% discount for renewal

Premium Support

Contract-based time and materials service
Help with the product use
Help with the product use
Help with the product use
Response within one business day
Response within one business day
Response within one business day
Provided by email
Provided by email
Provided by email
Product updates
Product updates
Phone, chat and remote desktop
Feature development
Priority issue resolution
We 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. — Sébastien Gemme, Canadian Space Agency
…I absolutely love your product. — Rob Desilets, Document Systems Inc.
…I have been very impressed with the amount of functionality provided as well as stability and robustness of the product… — Stephen Renner, IP Australia
I am very satisfied with the product as I find the abstraction to the JNI functionality of Java to be quite useful. — Adam Acott, Novex Software Development Inc.
…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. — Hector Zendejas, Cardware.biz
Licensing and pricing

Pay once, use forever

License use is governed by the product license agreement

Windows
32/64-bit
macOS
ppc32/x86/x64
Linux
x86/x64
Linux
ppc32/ppc64
Cross-Desktop
Win, Mac, Linux
Solaris
x86/x64
Solaris
ultraSPARC
IBM AIX
ppc32

Per developer

  • 1 developer

  • Perpetual license Perpetual license means you can always use the product version that you purchased, or the one you updated to during your valid support subscription.

  • Free distribution within your application

  • Unlimited projects

  • Updates & Support

  • 1 year of product updates

  • 1 year of technical support

  • 55 hours of support for 1 year

Project

  • Unlimited developers

  • Perpetual license Perpetual license means you can always use the product version that you purchased, or the one you updated to during your valid support subscription.

  • Free distribution within your application

  • 1 project Bundled to a Java package of the project.

  • Updates & Support

  • 1 year of product updates

  • 1 year of technical support

  • 75 hours of support for 1 year

Company-wide

  • Unlimited developers

  • Perpetual license Perpetual license means you can always use the product version that you purchased, or the one you updated to during your valid support subscription.

  • Free distribution within your application

  • Unlimited projects

  • Updates & Support

  • 1 year of product updates

  • 1 year of technical support

  • 100 hours of support for 1 year

Updates & Support renewal for 1 year

with 25% discount on the license price

The prices on this page are exclusive of any taxes.

Get licenses via resellers

Download JNIWrapper

for

Windows
32/64-bit
macOS
ppc32/x86/x64
Linux
x86/x64
Linux
ppc32/ppc64
Cross-Desktop
Win, Mac, Linux
Solaris
x86/x64
Solaris
ultraSPARC
IBM AIX
ppc32

Frequently asked questions

Technical questions

What platforms does JNIWrapper support?

JNIWrapper supports different operating systems and architectures:

  • Windows XP, Windows 2000, Windows Vista, Windows 7, Windows 8 for x86 and x86_64 architectures;
  • Linux for x86, x86_64, PPC and PPC64 architectures;
  • macOS with PCC, x86 and x86_64 architectures, SunOS for x86, x86_64, sparc and sparc64 architectures;
  • AIX PCC.

I am calling a function with correct number of parameters, but keep getting an exception about incorrect parameter types.

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.

I would like to invoke a function from a DLL that I generated with C# using JNIWrapper. Is it possible?

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.

Is it possible to integrate with a C++ library using JNIWrapper?

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.

How I can redistribute native JNIWrapper library (jniwrap.dll, jniwrap64.dll, etc.) with my application?

The simplest way is to package all required library files (including JNIWrapper libraries) to root folder of an application JAR file.

Where should I put my JNIWrapper license file (jniwrap.lic)?

The simplest way is to package that file to the \META-INF\ subdirectory of an application JAR file.

Is there a way to create Java wrapper for a particular native type having only its C definition?

Yes, you can use Codegen for JNIWrapper utility application to generate the corresponding Java wrapper for it.

How do I configure the license?

Licensing questions

What is your licensing based on?

Our licensing is based on versions of JNIWrapper. Having purchased the license for our product you get the right to use the current major version of the product.

Can I receive a free upgrade?

Major and minor version upgrades issued during your active Standard Support subscription period are free of charge. Upon expiration of the Standard Support subscription you can renew it with a 25% discount from the actual license price.

What are the terms for using JNIWrapper?

Please take a look at the Product License Agreement.

There are 6 people on our team, and 2 of them need to use JNIWrapper. How many licenses do we need to purchase?

You only need to purchase 2 licenses. We license our library by the number of people who write code using our library.

If we take a developer, working with JNIWrapper, off the project, can we reassign the license to another developer?

This is possible with the Per Developer License.

How many copies of my product can I distribute with JNIWrapper included?

You can distribute unlimited number of copies of your product with our library enclosed.

We have 5 people, who work with JNIWrapper on one product.

You may want to purchase a Project License, which is cost-effective in case there are 3 and more developers on the team. The Project License is bound to a single project you do, but it allows any number of developers in your company to work with our library.

How is a Project License bound to my project?

Project License is bound to your project via a fully-qualified class name. A fully-qualified name for a class is the package name followed by the class name, separated by a period (.). For example: com.mycompany.myproduct.MyClass

Which class can be used for binding the license?

This can be any class of your application. The only requirement is that it should be included into your Java application class path.

What’s the definition of “project” in terms of the Project License?

When we say “project” we have in mind one product of your company including your future product versions or potential derivative works based on your product.

Will we be able to use the Project License in another project we do?

The Project License is tied to one project only.

We’d like a license for multiple projects for a team of developers, what would you offer?

The best solution would be to purchase the Company–wide License, which covers any number developers and projects in one company.

How do I find the license file?

Upon the license purchase you will receive an archive with two types of license files: development and runtime. Development license is intended to be used in the development process. Runtime license is to be used for distribution of your software with JNIWrapper enclosed.

Free 30‑day trial

We will email you your trial key and a quick start guide.

Please do not use special characters or spaces

Please enter a valid email address

Read and agree to the terms to continue.
Spinner

Sending…

Sorry, the sending was interrupted

Please try again. If the issue persists, contact us at info@teamdev.com.

Thank you!

Start your free trial in few simple steps

1

Check your email

Links to download your evaluation license and distribution archive will arrive at your inbox in a few minutes.

If the message gets lost in your mailbox, try searching for an email from JNIWrapper Evaluation Support with “Your Free 30 Days Trial” subject.

2

Install the license

To start using JNIWrapper

  • download your evaluation license,
  • install the library JAR file and the license using the instruction.
3

Get started

Take a look at the tutorial to get JNIWrapper up and running in no time.

Find more useful information in the Support Documentation.

Check out the ready-made examples for instructions and ideas on what you can do with your newly gotten JNIWrapper.