This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: calling java from c++


>>>>> "Akos" == akos szalay <akos.szalay@sophos.com> writes:

Akos> I'm trying to call java from c++ using gcj.
Akos> I thought, that the following code should work, but it coredumps
Akos> (segmentation fault) on new.
Akos> Any idea what's wrong with it ? (any workaround for this problem ?)
Akos> I'm running redhat linux 7.1

You have to use the CNI invocation API.  It isn't as simple as just
creating a Java object -- the Java runtime needs to be initialized.

The CNI invocation API won't be available until gcc 3.1 is released.
Unfortunately it doesn't seem to be documented :-(

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]