As Java is becoming increasingly popular in distributed
and parallel computing ,
, there is a need to
provide Java bindings to the lip library. The approach to this
was to use Java Native Interface (JNI)
as a tool
for creating Java wrappers to lip functions. JNI
enables native code to use Java objects, call Java methods,
access Java arrays and take full advantage of Java-specific features
such as exceptions handling and threads. All this can be accessed by
calling appropriate functions from JNI API.
During our work it transpired that the interface creation process
using bare JNI is time consuming and error-prone.
As a solution of this problem the Java to Native Interface Extension
called Janet was created by Dawid Kurzyniec and described in
his M.Sc. thesis and papers
,
,
.
The Janet tool, now available on the Web
,
is an extension of the Java language that allows inserting
native (i.e. C) language statements directly into Java source code files.
The files with such extended Java syntax are the input for Janet
translator which creates automatically Java and native source files
with all the required JNI calls. It frees the programmer from calling low level
JNI API and makes interface creation more flexible and clearer.
Java bindigs to lip were created using Janet (described above). The contribution of the authors of this thesis was to complete Java wrappers for the implemented functions and to integrate them with the library. Performance tests were conducted as well.
Next: Java-Specific Features
Up: General Concepts
Previous: General Concepts
  Contents
Created by Katarzyna Zając