comp.lang.ada
 help / color / mirror / Atom feed
* mixing Java byte code created from Ada95 and Java byte code created from Java?
@ 1997-09-17  0:00 Sam Harbaugh, Palm Bay, Florida
  1997-09-18  0:00 ` Samuel Tardieu
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sam Harbaugh, Palm Bay, Florida @ 1997-09-17  0:00 UTC (permalink / raw)



Is it possible to put compiled Java classes created by a Java compiler from
Java source code into the Ada95 library and then "with" them when compiling
an Ada unit and then link them together to get a valid executable file?

I think that what I'm asking is

1) Does some brand(s) of Ada95 compiler know how to handle the withing of a
library unit compiled by a Java compiler?"

2) "Does some brand(s) of Ada95 linker know how to link Java things created
by an Ada95 compiler to Java things created by a Java compiler?"

Thanks.

sam harbaugh

p.s. I think that no Ada95 compilation system handles this but that it is
theoretically possible.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mixing Java byte code created from Ada95 and Java byte code created from Java?
  1997-09-17  0:00 mixing Java byte code created from Ada95 and Java byte code created from Java? Sam Harbaugh, Palm Bay, Florida
@ 1997-09-18  0:00 ` Samuel Tardieu
  1997-09-19  0:00 ` Robert Dewar
  1997-09-22  0:00 ` mixing Java byte code created from Ada95 and Java byte code Tucker Taft
  2 siblings, 0 replies; 5+ messages in thread
From: Samuel Tardieu @ 1997-09-18  0:00 UTC (permalink / raw)
  To: Sam Harbaugh, Palm Bay, Florida



>>>>> "Sam" == Sam Harbaugh, Palm Bay, Florida <harbaugh@IU.NET> writes:

Sam> 1) Does some brand(s) of Ada95 compiler know how to handle the
Sam>    withing of a library unit compiled by a Java compiler?"

Yes, as long as you keep respecting Ada semantics, i.e. you need to
have bindings with pragma Import that represent the classes written in 
Java.

Sam> 2) "Does some brand(s) of Ada95 linker know how to link Java
Sam>    things created by an Ada95 compiler to Java things created by
Sam>    a Java compiler?"

One of the features of the Java Virtual Machine is that it doesn't
require a link phase. Classes are loaded (or downloaded if you are
accessing a program via the network) when they are referenced, you
don't have to compute the closure of your program a priori.

  Sam
-- 
Samuel Tardieu -- sam@ada.eu.org




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mixing Java byte code created from Ada95 and Java byte code created from Java?
  1997-09-17  0:00 mixing Java byte code created from Ada95 and Java byte code created from Java? Sam Harbaugh, Palm Bay, Florida
  1997-09-18  0:00 ` Samuel Tardieu
@ 1997-09-19  0:00 ` Robert Dewar
  1997-09-20  0:00   ` Michael Stark
  1997-09-22  0:00 ` mixing Java byte code created from Ada95 and Java byte code Tucker Taft
  2 siblings, 1 reply; 5+ messages in thread
From: Robert Dewar @ 1997-09-19  0:00 UTC (permalink / raw)



Sam says

<<I think that what I'm asking is

1) Does some brand(s) of Ada95 compiler know how to handle the withing of a
library unit compiled by a Java compiler?"

2) "Does some brand(s) of Ada95 linker know how to link Java things created
by an Ada95 compiler to Java things created by a Java compiler?"
>>

Certainly the GNAT-to-JAVA system will (present tense not appropriate
yet!) answer YES, to both questions. I would assume that the current
Intermetrics systems would also answer YES, but I will let someone
else clarify this.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mixing Java byte code created from Ada95 and Java byte code created from Java?
  1997-09-19  0:00 ` Robert Dewar
@ 1997-09-20  0:00   ` Michael Stark
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Stark @ 1997-09-20  0:00 UTC (permalink / raw)



Robert Dewar wrote:
> 
> Sam says
> 
> <<I think that what I'm asking is
> 
> 1) Does some brand(s) of Ada95 compiler know how to handle the withing of a
> library unit compiled by a Java compiler?"
> 
> 2) "Does some brand(s) of Ada95 linker know how to link Java things created
> by an Ada95 compiler to Java things created by a Java compiler?"
> >>
> 
> Certainly the GNAT-to-JAVA system will (present tense not appropriate
> yet!) answer YES, to both questions. I would assume that the current
> Intermetrics systems would also answer YES, but I will let someone
> else clarify this.

I've been using Intermetrics on the Sun, and the way you do this is to
run their "java2ada" tool, which creates an ada package spec (w/ pragma
Imports) from the byte code.  You then use the "adareg" tool to let the
AppletMagic compiler know that this code is available to code.  At
least, this sequence of steps works, if my reasoning is fuzzy Tuck will
let us know! ;)

Mike




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mixing Java byte code created from Ada95 and Java byte code
  1997-09-17  0:00 mixing Java byte code created from Ada95 and Java byte code created from Java? Sam Harbaugh, Palm Bay, Florida
  1997-09-18  0:00 ` Samuel Tardieu
  1997-09-19  0:00 ` Robert Dewar
@ 1997-09-22  0:00 ` Tucker Taft
  2 siblings, 0 replies; 5+ messages in thread
From: Tucker Taft @ 1997-09-22  0:00 UTC (permalink / raw)



Sam Harbaugh, Palm Bay, Florida (harbaugh@IU.NET) wrote:

: Is it possible to put compiled Java classes created by a Java compiler from
: Java source code into the Ada95 library and then "with" them when compiling
: an Ada unit and then link them together to get a valid executable file?

Essentially.  We include a tool "java2ada" with our AppletMagic(tm)
Ada=>Java-byte-code compiler which will generate an Ada package
spec given a java byte-code ".class" file.  You then "register"
this package spec (using our "adareg" tool) and you can now call
any of the public methods, and reference andy of the
public fields, of the Java class, from Ada.  See "www.appletmagic.com"
or "www.inmet.com/javadir/download"

: I think that what I'm asking is

: 1) Does some brand(s) of Ada95 compiler know how to handle the withing of a
: library unit compiled by a Java compiler?"

Yes, AppletMagic (and the Ada=>Java component of ObjectAda), via
the "java2ada" tool.

: 2) "Does some brand(s) of Ada95 linker know how to link Java things created
: by an Ada95 compiler to Java things created by a Java compiler?"

Yes, the above compilers generate Java byte codes, and so they
dynamically link to byte-codes compiled by a Java compiler.

: Thanks.

: sam harbaugh

: p.s. I think that no Ada95 compilation system handles this but that it is
: theoretically possible.

--
-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Burlington, MA  USA




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1997-09-22  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-17  0:00 mixing Java byte code created from Ada95 and Java byte code created from Java? Sam Harbaugh, Palm Bay, Florida
1997-09-18  0:00 ` Samuel Tardieu
1997-09-19  0:00 ` Robert Dewar
1997-09-20  0:00   ` Michael Stark
1997-09-22  0:00 ` mixing Java byte code created from Ada95 and Java byte code Tucker Taft

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