comp.lang.ada
 help / color / mirror / Atom feed
From: "Dr. Adrian Wrigley" <amtw@linuxchip.demon.co.uk.uk.uk>
Subject: Re: Interfacing Ada code to Java - resources and hints
Date: Sun, 20 Mar 2005 12:35:15 GMT
Date: 2005-03-20T12:35:15+00:00	[thread overview]
Message-ID: <pan.2005.03.20.12.35.05.623128@linuxchip.demon.co.uk.uk.uk> (raw)
In-Reply-To: pan.2005.03.20.01.31.27.365834@linuxchip.demon.co.uk.uk.uk

In case it's not clear, I'm hoping to use the normal GNAT compilation
system to build an Ada program (Ada "main") which calls some
code written in Java.  Preferably I'd end up with a single executable
without bringing in loads of additional libraries and runtime files.

For my current project (interfacing to Interactive Brokers' Java
TWS API), there are several alternatives:

Rewrite the supplied Java or C++ code in Ada or C
Modify the supplied C++ to work without MSFC etc 

The code is simple enough that a rewrite wouldn't take too
long, but it would require regular updates as the interfaces changed :(

I think Ada can interface to Java as if it were regular C code.
This would involve the JNI, with pragma Import (C,...)
Something based on gcj might also be interesting to try.

Looking to the future, I'd like to be able to interface to things
like JGraph http://www.jgraph.com/ (a graph editing component),
but this looks much more challenging.  Java seems designed
with little regard to inter-language interoperability :(

Thanks for your ideas!
-- 
Adrian




  parent reply	other threads:[~2005-03-20 12:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-20  1:29 Interfacing Ada code to Java - resources and hints Dr. Adrian Wrigley
2005-03-20  3:43 ` Ed Falis
2005-03-20 10:44   ` Jerome Hugues
2005-03-20  9:22 ` Pascal Obry
2005-03-20 10:49 ` Jerome Hugues
2005-03-20 12:35 ` Dr. Adrian Wrigley [this message]
2005-03-20 18:11   ` Ludovic Brenta
2005-03-20 18:55     ` Dr. Adrian Wrigley
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox