From: "Marc A. Criley" <mcqada95@earthlink.net>
Subject: Re: Setting up a Java Callback to Ada
Date: Mon, 21 Jan 2002 12:50:27 GMT
Date: 2002-01-21T12:50:27+00:00 [thread overview]
Message-ID: <3C4C018B.82781040@earthlink.net> (raw)
In-Reply-To: 3C4BB9B2.6080409@worldnet.att.net
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
next prev parent reply other threads:[~2002-01-21 12:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-18 18:11 Setting up a Java Callback to Ada Kevin Brugh
2002-01-19 19:38 ` Marc A. Criley
2002-01-21 6:08 ` Kevin Brugh
2002-01-21 6:49 ` Jim Rogers
2002-01-21 9:54 ` Hyman Rosen
2002-01-21 22:40 ` David Kirk
2002-01-21 12:50 ` Marc A. Criley [this message]
2002-01-22 18:35 ` Stephen Leake
2002-01-23 21:04 ` richtmp
2002-01-25 12:53 ` Marc A. Criley
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox