Neha Patil (Editor)

JNAerator

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Developer(s)
  
Olivier Chafik

Operating system
  
Cross-platform

License
  
LGPL

Written in
  
Java

Type
  
(library/API)

JNAerator

Stable release
  
0.12 / May 8, 2015; 21 months ago (2015-05-08)

JNAerator is a computer programming tool for the Java programming language which automatically generates the Java Native Access (JNA) or BridJ code needed to call C and Objective-C libraries from Java code.

Contents

It reads in ANSI C header files and emits Java code. Some optional customization can be done through command line options, which can be saved in configuration files.

JNAerator does not need any native compiling beyond that of the targeted dynamic library (all of the glue code is in Java), which helps simplify the process of binding Java to C native libraries when compared to Java Native Interface (JNI)-based means.

Its output is typically larger and harder to use than hand-crafted JNA bindings, but it saves time and effort for bindings of large libraries with JNA.

JNAerator Studio

While JNAerator is mainly a command-line-based tool, it also contains a limited GUI that's ideal for simple quick generation experiments.

It can be launched from the Web using the direct WebStart link from the project's main page, or by double-clicking on JNAerator's JAR executable archive.

Uses

NativeLibs4Java gathers a few JNAerator-generated Java wrappers for native libraries:

  • JavaCL and OpenCL4Java, OpenCL library
  • Mono4Java : Mono/.NET embedding API
  • Mac OS X Frameworks, work being integrated to Rococoa
  • References

    JNAerator Wikipedia