The JANET project supports integration of applications written in Java programming language with codes and libraries written in other languages. It is useful in three situations:
JANET project has been recently moved to Source Forge.PROJECT OVERVIEW
Java language can be interfaced with native codes using Java Native Interface (JNI). However, the JNI provides interface at a very low level - much closer to the Java Virtual Machine that the Java language itself - and therefore it is very inconvenient to use. For example, it does not provide safe notion of handling Java exceptions or synchronizing on Java monitors. Directly used JNI leads to large codes which are error prone, expensive to debug and hard to maintain. They are extremely sensitive to even minor changes in Java application, resulting in errors which appear as late as in run time.
JANET provides the preprocessing tool which enables creation of JNI-based Java to native code interfaces without direct use or even knowledge of the JNI itself. At the same time, it does not limit the flexibility of generating interfaces, and it introduces almost no additional performance overhead.
JANET provides a language extension which allows to incorporate native code directly into Java source files. Such embedded native code can then perform various operations on Java objects using convenient Java syntax instead of peculiar JNI function invocations. The exception handling and monitor locking operations are as simple as in pure Java. Also, issues related to accessing Java strings and arrays from native side are eliminated as they are handled by the code generated automatically by JANET.
The source code handled by the programmer is much smaller and more concise thus easier to maintain. Also, JANET intercepts most of programming errors at compile time and it generates interfaces which are more safe and reliable than those developed using pure JNI.
JANET is free software available under the terms of the Mozilla 1.1 Public License.CONTRIBUTIONS
JANET is a research project originally developed by Dawid Kurzyniec as his M. Sc. Thesis in the Institute of Computer Science at Stanislaw Staszic University of Mining and Metallurgy in Cracow, Poland. The Thesis was lead by Dr Marian Bubak who made important contribution and was strongly involved in the project. Also, the contribution has been made by Piotr Luszczek. Currently, JANET is developed by Dawid Kurzyniec in the Department of Math and Computer Science at the Emory University in Atlanta, Georgia, USA, under supervision of Prof. Vaidy Sunderam.