Pseudo “rivals,” the Ada and Java programming languages can now talk to each other –without requiring a middleman … or middleware, rather. Case in point: AdaCore’s new GNAT Ada-Java Interfacing Suite (GNAT-AJIS) can fully replace slow, painstaking middleware in Ada-Java mixed language application development. Utilizing the suite, Ada developers can add Ada components to Java-based systems, while Java programmers can maximize Ada’s performance and functionality in real-time control. GNAT-AJIS accomplishes this by enabling developers to fold natively- or Java Virtual Machine (JVM)-compiled Ada code into Java applications that have been compiled to the JVM.
The interfacing suite, targeting the Java and Ada communities, achieves its mission with two primary tools. First, a binding generator transforms an Ada package specification (input) into Java classes (output), with methods that correspond natively to Ada subprograms. The binding generator creates needed “glue code” that allows programmers to not bog themselves down in details; meanwhile, the suite’s interfacing utilizes the Java Native Interface (JNI). Second, GNAT-AJIS includes the JGNAT compiler, which serves to compile Ada to the JVM. Of course, die-hards who opt to use middleware for purposes other than Java/Ada interfacing (such as facilitating an application’s distribution) will find that GNAT-AJIS works just fine with middleware as well.