Is there any restriction in C++ calling Java methods?

C

Cal

We develop a Java application using mule, which run ok. But when
called in C++, it tells that 0x6e032858 instruction accessing memory
with invalid address 0x00000000.

So I wonder whether there is some restrictions concerning with C++
calling Java methods. And how can I correct this error? Thank you very
much.

Allen
 
A

Arne Vajhøj

Cal said:
We develop a Java application using mule, which run ok. But when
called in C++, it tells that 0x6e032858 instruction accessing memory
with invalid address 0x00000000.

So I wonder whether there is some restrictions concerning with C++
calling Java methods. And how can I correct this error? Thank you very
much.

Calling Java code from C++ via JNDI is supported and should work.

But you can easily mess something up in the call.

If you can recreate a small example that can recreate it then we can
look at that.

If not then it will be hard work to track it down.

Arne
 
T

Tom Anderson

Calling Java code from C++ via JNDI is supported and should work.

Yes, you just implement your code as a JNDI service provider, then wrap
the JNDI objects in a CosNaming interface and export that through CORBA.
Import the interfaces to the C++ app via an ORB, and you're away.

Another option would be use JNI, i think you can use that for this too.

I apologise for the pun about CORBA, although i would like to point out
that it's technically accurate.
If you can recreate a small example that can recreate it then we can
look at that.
Yup.

If not then it will be hard work to track it down.

Ooh yup.

tom
 
A

Arne Vajhøj

Tom said:
Yes, you just implement your code as a JNDI service provider, then wrap
the JNDI objects in a CosNaming interface and export that through CORBA.
Import the interfaces to the C++ app via an ORB, and you're away.

Another option would be use JNI, i think you can use that for this too.

I apologise for the pun about CORBA, although i would like to point out
that it's technically accurate.

ROFL

:) :) :) :) :) :) :) :)

That is good humor.

Arne
 
R

Roedy Green

We develop a Java application using mule, which run ok. But when
called in C++, it tells that 0x6e032858 instruction accessing memory
with invalid address 0x00000000.

So I wonder whether there is some restrictions concerning with C++
calling Java methods. And how can I correct this error? Thank you very
much.

see http://mindprod.com/jgloss/jni.html

I strongly suggest getting a book to explain it. It is fiddly code.
--
Roedy Green Canadian Mind Products
http://mindprod.com

"If everyone lived the way people do in Vancouver,
we would need three more entire planets to support us."
~ Guy Dauncey (born: 1948 age: 61)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top