JNAerator (licensed under LGPL 3.0) lets Java programmers access native libraries transparently, using a runtime such as BridJ (C / C++, BSD-license), JNA (C only, LGPL) or Rococoa (Objective-C).

This new release contains tons of critical fixes, so all JNAerator users are strongly encouraged to migrate to this new version.

Here’s a summary of the changes between version 0.9.7 and 0.10 (see full change log here) :

  • Fixed generation of large long values
  • Fixed conditional parsing of __in modifier (and COM modifiers in general)
  • Fixed generation of globals and variables included more than once
  • Fixed parsing of unary ‘-‘ operator
  • Fixed parsing of C++ constructors and class inheritance
  • Fixed parsing of default values for type name template arguments
  • Fixed parsing of const type mutator (fixes void f(struct x * const);) (issue #205)
  • Fixed parsing of null char escape ‘\0’ (issue #214)
  • Fixed conversion of int a; f(&a);
  • Fixed handling of “long int” and “short int” (issue #267)
  • Fixed parsing of __declspec, __attribute__ and some modifiers-related regressions
  • Fixed conversion of __inline functions when -convertBodies is on
  • Fixed NPE in JNAeratorUtils.findBestPlainStorageName (issue #258)
  • Fixed parsing of empty strings (spotted by @ENargit in issue #255)
  • Fixed generation of typedefs (issue #273)
  • Fixed generation of casted constants (issue #96)
  • Fixed generation of unnamed structs and unions (issue #94)
  • Fixed multidimensional array sizes for JNA target (issue #165)
  • Fixed handling of hexadecimal constants (issue #296)
  • Fixed conversion of comments for BridJ target runtime
  • Fixed generation of BridJ calling conventions (issue #282)
  • Fixed handling of __stdcall function pointers and functions (issue #282)
  • Fixed mapping of bool for JNA(erator) target runtime (issue #289)
  • Fixed parsing of malloc, free and many potential modifiers (issue #278 and issue #280)
  • Fixed handling of unicode library paths (issue #276)
  • Fixed parsing of friend members in C++ classes, and of assignment operators (operator+=, …)
  • Fixed generation of very simple edge cases “long f();”, “short f();”, “f();” (issue #270)
  • Changed naming of anonymous function pointer types : void f(void (*arg)()); now yields callback f_arg_callback
  • Enhanced handling of parsing failures : faster failover to “sliced” parsing, reduced verbosity of errors
  • Added Maven output modes and -mode switch to choose between Jar, StandaloneJar, Directory, Maven, AutoGeneratedMaven (deprecated -noJar and -noComp)
  • Added support for MSVC asm soups + added -removeInlineAsm hack switch that tries to regex-remove __asm soups that still cannot be parsed out
  • Added support for BridJ’s bundled libraries mechanism and paths (+ enforce them using an enum param)
  • Added parsing of expression initializer blocks v = { 1, 2, 3};
  • Added preservation of original textual representation of constants
  • Added tr1 to default C++ includes
  • Generate symbols of all files in directories where any file was explicitly listed
  • Added support for command-line definition of macros with arguments : -Df(x)=whatever
  • Added conversion of malloc(x * y * sizeof(whatever))
  • Removed C++ name mangling feature for JNA target runtime (was simplistic anyway)
  • Release artifacts are available in Maven Central

Special thanks to the users and bug reporters that helped getting this version out !

You can contribute to the project by reporting bugs here and joining the NativeLibs4Java Community.

Wait no longer : try JNAerator through Java Web Start, or download it now !