Will cni be the sane native interface to c++ in openjdk U gcj?

Andrew Haley aph@redhat.com
Tue Dec 25 16:50:00 GMT 2007


Glenn Chambers writes:
 > On Tue, 2007-12-25 at 12:03 +0000, Andrew Haley wrote:
 > > Glenn Chambers writes:
 > 
 > >  > It's been a few years since I last played seriously in this area, but at
 > >  > that point, there were enough impedance mis-matches between C++ objects
 > >  > and Java objects that C-style glue layers turned out to be necessary.
 > >  > 
 > >  > In particular, code that threw or caught C++ exceptions couldn't also
 > >  > throw and catch Java exceptions.  This may have changed in recent
 > >  > versions; I'll let the developers clarify that point.
 > > 
 > > This works fine, and has for a long while.  I don't know how long ago
 > > you tried.
 > 
 > It was back in the early days of the 3.x series, as you can see from 
 > the FAQ entry I wrote on this subject.  (Check out entry 6.1)
 > 
 > If I can get some spare cycles, I'll have to update that example; the
 > problems with exception personalities are gone in the version 3.3 gcj
 > on my (quite old) SUSE install.

Mmm, I think you are right.  C++ code either throws Java exceptions or
C++ exceptions, but not both.  I failed proprtly to read what you
wrote.

Andrew.

-- 
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903



More information about the Java mailing list