Link Details

Link 39113 thumbnail
User 111696 avatar

By bloid
via jna.dev.java.net
Published: Sep 04 2007 / 09:50

JNA provides Java programs easy access to native shared libraries (e.g. DLLs on Windows) without writing anything but Java code—no JNI or native code is required. This functionality is comparable to Windows' Platform/Invoke and Python's ctypes. Access is dynamic at runtime without code generation. JNA's design aims to provide native access in a natural way with a minimum of effort. No boilerplate or generated code is required. While some attention is paid to performance, correctness and ease of use take priority.
  • 22
  • 0
  • 2821
  • 936

Comments

Add your comment
User 242033 avatar

tsg replied ago:

0 votes Vote down Vote up Reply

J/Invoke - http://www.jinvoke.com - is a similar commercial product that also lets you do this. It makes calling functions from a native DLL as easy as P/Invoke does for .NET. Java developers can simply annotate a native method with the DLL and function name and J/Invoke manages the task of loading the specified DLL, automatically converting Java arguments to C arguments and invoking the target function in the DLL.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.