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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5e3fa264114b41e3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-21 04:50:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3C4C018B.82781040@earthlink.net> From: "Marc A. Criley" Organization: Quadrus Corporation X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Setting up a Java Callback to Ada References: <3C49BE2C.F114478D@earthlink.net> <2870b407.0201202208.23b3374f@posting.google.com> <3C4BB9B2.6080409@worldnet.att.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 21 Jan 2002 12:50:27 GMT NNTP-Posting-Host: 158.252.122.132 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 1011617427 158.252.122.132 (Mon, 21 Jan 2002 04:50:27 PST) NNTP-Posting-Date: Mon, 21 Jan 2002 04:50:27 PST X-Received-Date: Mon, 21 Jan 2002 04:50:25 PST (newsmaster1.prod.itd.earthlink.net) Xref: archiver1.google.com comp.lang.ada:19137 Date: 2002-01-21T12:50:27+00:00 List-Id: Jim Rogers wrote: > > Note that the JNI model of software development ALWAYS starts with Java. > First you define your class containing remote methods. Then you create a > C header file from those methods using the javah tool. You implement the > corresponding C functions. You also implement the Java code to call the > remote methods. The C functions must handle all compatibility issues. > > If you want Java to call an Ada subprogram you must build a C wrapper > that Java actually calls. That wrapper will handle all data > compatiblity issues and call the Ada subprogram. Trying to use JNI to > communicate between Java and Ada means programming in three languages. > Jim is correct here. As an exercise a couple years ago I did in fact have Java call an Ada subprogram via JNI. It worked, but I had to have the C wrapper, and also additional (native) C functions to call adainit and adafinal. Marc A. Criley Consultant Quadrus Corporation www.quadruscorp.com