audio-input-microphone.png Apache ActiveMQ with Delphi - free online session at CodeRage 4

The CodeRage 4 technical conference included a free online session "Reliable Communication between Applications with Delphi and ActiveMQ".

Visit the CodeRage 4 Sessions page to watch the recorded session!

daraja JNA toolkit

Documentation and examples for Java Native Access with Delphi

The daraja JNA toolkit is a library and documentation kit for Delphi(tm) developers which helps getting started with JNA (Java Native Access). It contains Delphi and Java(tm) source code, unit tests, build scripts and documentation which give an introduction and usage examples for Delphi and Java integration using native library calls.

Future plans for the daraja JNA toolkit project

  • callback examples
  • additional Unicode examples
  • automatic generation of wrapper code using JNAerator (If the C header files for your library are available, you can auto-generate a library mapping by using Olivier Chafik's excellent JNAerator utility. This is especially useful if your library uses long or complicated structures where translating by hand can be error-prone.)
  • support for Free Pascal

daraja JNA toolkit is free

daraja JNA toolkit will be licensed under an open source / documentation license. Note that the current download contains only a very simple Delphi DLL project and a matching Java test project.

help-browser.png Daraja is a word in the Swahili language and means 'bridge'.

Requirements

  • Delphi 6 or higher to build the example DLLs (the DLLs are prebuilt in the download)
  • Java 1.5 JDK (or higher) and JUnit to compile and run the Java test projects
  • Apache Maven 2.1 to download dependencies and build and run the Java test projects
  • the JNA library

About JNA (Java Native Access)

Java Native Access 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. While some attention is paid to performance, correctness and ease of use take priority. The JNA library uses a small native library called libffi to dynamically invoke native code. The JNA library uses native functions that allow code to load a library by name and retrieve a pointer to a function within that library, and uses libffi library to invoke it, all without static bindings, header files, or any compile phase. The developer uses a Java interface to describe functions and structures in the target native library. This makes it quite easy to take advantage of native platform features without incurring the high overhead of configuring and building JNI code. - Java Native Access, http://en.wikipedia.org/w/index.php?title=Java_Native_Access&oldid=323256927 (last visited Nov. 5, 2009).

JNA features:

  • Automatic mapping from Java to native functions, with simple mappings for all primitive data types
  • Runs on most platforms which support Java
  • Automatic conversion between C and Java strings, with customizable encoding/decoding
  • Structure and Union arguments/return values, by reference and by value
  • Function Pointers, (callbacks from native code to Java) as arguments and/or members of a struct
  • Auto-generated Java proxies for native function pointers
  • By-reference (pointer-to-type) arguments
  • Java array and NIO Buffer arguments (primitive types and pointers) as pointer-to-buffer
  • Nested structures and arrays
  • Wide (wchar_t-based) strings
  • Native long support (32- or 64-bit as appropriate)
  • Demo applications
  • Supported on 1.4 or later JVMs (earlier VMs may work with stubbed NIO support)
  • Customizable marshalling/unmarshalling (argument and return value conversions)
  • Customizable mapping from Java method to native function name, and customizable invocation to simulate C preprocessor function macros
  • Support for automatic Windows ASCII/UNICODE function mappings
  • Varargs support
  • Type-safety for native pointers
  • VM crash protection (optional)
  • Optimized direct mapping for high-performance applications
text-html.pnginformation

 
XHTML | CSS | ATOM | YAML - Yet Another Multicolumn Layout © 2005-2009 by Dirk Jesse [ highresolution.info ] | web site created with BetaWebzz 2.0 Personal Edition
Copyright © 2009 Michael Justin. All rights reserved. | Tango Icon Library | Privacy | Trademarks | Feedback | Tracker | Blog | Books | Imprint | Contact