Java Native Access - The easy way to connect Java and C/C++
As stated on Wikipedia
" 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. JNA's design aims to provide native access in a natural way with a minimum of effort. No boilerplate or generated glue code is required."
A while back for a personal project i related to the gaming system Sega Dreamcast needed to access the cdrom drive and iso files from Java. Looking at the options available i came to the conclusion that libcdio was what suited my needs best. Not being the world's biggest fan of JNI i came across JNA .It this in hand i proceeded to create a small library around it libcdio with a simple API to be called from JAVA.
Using JNAerator ( JNAerator ) i was able to obtain a Java file representing the dynamic library i had just created in C.
Starting it involved taking into consideration the jna library path and we were all set.
Most recently i came back to JNA to see the advancements that had been made, and its good to see that the project is being used by so many people :
- Apache Cassandra: Large-scale NoSQL data store.
- Rococoa: Java bindings to the Mac OS X Cocoa framework, by Duncan McGregor.
- jna-posix: Common POSIX Functions for Java.
- JNAerator: Pronounced "generator", auto-generates JNA mappings from C headers, by Olivier Chafik.
- Freedom for Media in Java by Ken Larson/Dieter Krachtus.
- gstreamer for Java by Wayne Meissner.
- Videolan: JVLC Java Multimedia Library.
- SVNKit: Pure Java Subversion client library.
- OmegaT Computer-Aided Translation.
- IntelliJ IDEA by JetBrains.
- NetBeans IDE.
- Athena Backup by Doug Patriarche.
- FileBot Media Renamer by Reinhard Pointner.
- USB for Java by Mario Boikov.
- Waffle: Enables SSO on Windows in Java applications, by Daniel Doubrovkine.
- leveldb-jna: Cross-platform JNA based adapter for LevelDB (used in Keylord).
- Java OpenVR Bindings.
Being a retro gaming enthusiast i took a look into libretro and how easy i could replicate the API in Java. The result can be found at LibretroJNA .
By this time i hope i have at least sparked your interest and curiosity in this project. Perhaps it will make your life easier someday.