JNAerator
   HOME

TheInfoList



OR:

JNAerator is a
computer programming Computer programming or coding is the composition of sequences of instructions, called computer program, programs, that computers can follow to perform tasks. It involves designing and implementing algorithms, step-by-step specifications of proc ...
tool A tool is an Physical object, object that can extend an individual's ability to modify features of the surrounding environment or help them accomplish a particular task. Although many Tool use by animals, animals use simple tools, only human bei ...
for the
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
which automatically generates the
Java Native Access Java Native Access (JNA) is a community-developed library that provides Java programs easy access to native shared libraries without using the Java Native Interface (JNI). JNA's design aims to provide native access in a natural way with a minimum ...
(JNA) or BridJ code needed to call C, C++ and
Objective-C Objective-C is a high-level general-purpose, object-oriented programming language that adds Smalltalk-style message passing (messaging) to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was ...
libraries from Java code. It reads in
ANSI C ANSI C, ISO C, and Standard C are successive standards for the C programming language published by the American National Standards Institute (ANSI) and ISO/IEC JTC 1/SC 22/WG 14 of the International Organization for Standardization (ISO) and the ...
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 The Java Native Interface (JNI) is a foreign function interface programming framework that enables Java code running in a Java virtual machine (JVM) to call and be called by native applications (programs specific to a hardware and operating s ...
(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 OpenCL (Open Computing Language) is a software framework, framework for writing programs that execute across heterogeneous computing, heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), di ...
library
Mono4Java
: Mono/.NET embedding API
Mac OS X Frameworks
work being integrated t
Rococoa


See also

* Gluegen, a similar tool used by the
Java OpenGL Java OpenGL (JOGL) is a wrapper library that allows OpenGL to be used in the Java programming language. It was originally developed by Kenneth Bradley Russell and Christopher John Kline, and was further developed by the Game Technology Group at Su ...
(JOGL) project but needs compiling of native code and provides added runtime features such as argument bounds checks (this Wikipedia page was copied over and adapted from there) *
SWIG The Simplified Wrapper and Interface Generator (SWIG) is an open-source software tool used to connect computer programs or libraries written in C or C++ with scripting languages such as Lua, Perl, PHP, Python, R, Ruby, Tcl, and other lang ...
, another free
computer software Software consists of computer programs that instruct the Execution (computing), execution of a computer. Software also includes design documents and specifications. The history of software is closely tied to the development of digital comput ...
tool used to connect programs written in C/ C++ with various
scripting language In computing, a script is a relatively short and simple set of instructions that typically automation, automate an otherwise manual process. The act of writing a script is called scripting. A scripting language or script language is a programming ...
s, and to C# and
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
. It also needs native compiling.


External links

*
NativeLibs4Java site on Google Code ArchiveBridJ site on googlecode.com
{{DEFAULTSORT:Jnaerator Java platform Application programming interfaces