GNAT Pro Java – Ada-Java Interfacing Suite

The GNAT Ada-Java Interfacing Suite is a collection of GNAT Pro add-on tools for combining native Ada code with Java applications that run on a Java Virtual Machine (JVM). Through these tools you can call natively-compiled Ada from Java, and call Java from native Ada programs. This enterprise-oriented toolsuite lets Ada teams interoperate with companies and groups doing Java development, with an interfacing facility that is efficient and type safe.

A separate product, GNAT for the JVM, provides a complementary capability: compiling Ada directly to JVM bytecodes.


Interfacing between Ada and Java has been simplified in Ada 2005 through a number of new language features. The GNAT Ada-Java Interfacing Suite takes full advantage of these features and thus allows users to engineer standards-compliant mixed Ada/Java systems.

Benefits include:

  • Smooth and efficient interfacing
    • Makes Ada components available to Java developers
    • Makes Java classes available to Ada developers, for example:
      • Java graphical interface frameworks such as SWT, Swing, and Eclipse-RCP
      • The large supply of off-the-shelf Java components
  • Supported by standard AdaCore Integrated Development Environments
    • GNAT Programming Studio (GPS)
    • GNATbench Eclipse plug-in

Technical features

  • Allows calls from Ada to Java, and from Java to Ada
  • Provides an Ada binding to the low-level Java Native Interface (JNI) library
  • Provides an automated and type-safe binding generator from Ada to Java
    • Automates the generation of JNI “glue” code
    • Supports access to various Ada constructs from Java, including:
      • Subprograms, types, variables, and constants
      • Tagged types, with cross-language dispatching for Ada types extended in Java
    • Supports exception propagation through Ada and Java frames
  • Allows efficient implementation of Java native methods in Ada