Java Native Access - The easy way to connect Java and C/C++
Image found at http://javapapers.com/

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 :

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.

To view or add a comment, sign in

Others also viewed

Explore content categories