Java and Ada

Sun's Java technology has become a "hot" topic. Java makes it possible for users to run programs just by browsing the World Wide Web (WWW). Using Java, WWW users can use sophisticated user interfaces and handle arbitrary data formats (the data and the program to handle the data can be sent together!). Java can also be used to distribute computer platform independent software (i.e. the same software would run on an IBM-compatible PC, Apple Macintosh, and arbitrary Unix machine).

[Relationship of Java Technology Components] It turns out that Java programs can be created using Ada. An Ada language compiler can be used to generate Java "class" files, just like a Java language compiler does. Users can then run these "class" files using their implementation of the Java Virtual Machine (JVM) - and Netscape's Navigator is one of those implementations. Ada and Java components can even freely call each other.

The Lovelace tutorial (a tutorial on the Ada 95 programming language) includes several sections on how to create Java programs using the Ada 95 programming language. It also includes some small examples and references to other material.

If you're interested in reading those sections, take a look at the outline of lesson 16. You can even jump to the first section on Java, which is currently section 16.4. Warning: do not create hypertext links to an individual section, since section numbers change over time. Instead, create links (such as bookmarks) to this page instead. These sections assume that you already know some Ada; if you don't, you can start from the beginning of the Lovelace tutorial and learn Ada.

Lovelace includes two sample Java programs in Ada:

  1. Hello (you can run it or see its source code).
  2. Doodle (you can run it or see its source code).

Here are some useful related resources:

  1. More specific details of the correspondence between Java and Ada, including information on constructors, is described in a paper by Tucker Taft [1996].
  2. More Ada/Java information can be found at the Home of the Brave Ada Programmers' Java section and the SIGAda Web Working Group home page. A number of relevant briefings from the Monmouth University Advanced Software Technology Open House (May 1996) are available as well.
  3. General information about Intermetrics' AppletMagic is available.
  4. Documentation on the Ada interface to the Java library is available from Intermetrics. This documentation was developed using my Ada-to-HTML translator, ada2html.
  5. More information about Java in general can be found in the Java FAQ and Sun's Java site.
  6. A large collection of sample Java applets is available at Gamelan.

HOME     You can go to the Lovelace home page.


This page was last modified on 7-May-1996.

David A. Wheeler (dwheeler@dwheeler.com)