AdaCore has announced availability of its GNAT Ada-Java Interfacing Suite (GNAT-AJIS), which lets developers build applications using both languages. With GNAT-AJIS, programmers can combine Java applications compiled to the Java Virtual Machine (JVM) and Ada code that has been compiled either natively or to the JVM.
GNAT-AJIS is aimed at both the Ada and Java development communities. For Ada programmers, GNAT-AJIS provides a mechanism to plug Ada components into systems (such as GUI frameworks) that are often written in Java. For Java programmers, GNAT-AJIS provides a means to take advantage of Ada's functionality or performance, for example in real-time control.
The initial release of GNAT-AJIS consists of two principal tools:
- A "binding generator: that takes an Ada package specification as input and produces Java classes as output, with native methods corresponding to the Ada subprograms
- The JGNAT compiler, which compiles Ada to the JVM.
Through the binding generator, Java applications can call native Ada code. The interfacing uses the Java Native Interface (JNI), but the binding generator produces the necessary glue code so that the programmer need not be concerned with the details. In JGNAT, since both Java and Ada are compiled to bytecodes, the interfacing is direct.
"With today's increasingly ambitious system requirements, multi-language systems are more and more common," said Robert Dewar, CEO and President of AdaCore. "The GNAT Ada-Java Interfacing Suite allows projects to realize the benefits of both Ada and Java through a cohesive framework. Ada is well suited to this level of co-operation, especially with the enhancements added in Ada 2005."