From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f70f5d396358ad88 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!newspeer1-win.ntli.net!newsfe1-gui.ntli.net.POSTED!53ab2750!not-for-mail From: "Dr. Adrian Wrigley" Subject: Re: Interfacing Ada code to Java - resources and hints User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Message-ID: Newsgroups: comp.lang.ada References: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Sun, 20 Mar 2005 12:35:15 GMT NNTP-Posting-Host: 81.100.88.147 X-Complaints-To: http://www.ntlworld.com/netreport X-Trace: newsfe1-gui.ntli.net 1111322115 81.100.88.147 (Sun, 20 Mar 2005 12:35:15 GMT) NNTP-Posting-Date: Sun, 20 Mar 2005 12:35:15 GMT Organization: ntl Cablemodem News Service Xref: g2news1.google.com comp.lang.ada:9635 Date: 2005-03-20T12:35:15+00:00 List-Id: 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