Comprehensive Ada Toolsuite

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

Supported Platforms

For the most up-to-date information on available platforms please contact us at:

Knowledge Center

Developer Gems    

  • Gem #58: Ada / Java exception handling

    Ada Gem #58 — Ada and Java are two languages that rely heavily on exceptions. A large part of the Ada data model is based on the fact that data is checked at run time, and will raise various kinds of exceptions such as Constraint_Error when constraints are violated. Similarly, there are many cases where Java performs checks that can raise exceptions, among the most common being checks on casts and null dereferences. It is therefore extremely important to support exceptions that are properly propagated from one language to the other and even potentially caught/handled, without having to worry about the language of origin.

  • Gem #57: Ada / Java cross dispatching

    Ada Gem #57 — In the preceding Ada/Java interfacing Gem, we saw how to create calls from Ada to Java using ada2java and callbacks. We’re now going to go one step further, and discuss a cross-language dispatching mechanism that supports extension of an Ada tagged type in Java, allowing the possibility of making dispatching calls equally well from either side.

Live Docs

  • GNAT-AJIS User’s Guide »

    This guide describes the features and the use of GNAT-AJIS, the GNAT Ada-Java Interfacing Suite that can be used with the GNAT Pro Ada development environment.

Press Releases

In the Press