Interoperability Java - C++
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jack_Olla
Posted On:   Friday, November 21, 2003 08:42 AM

Hello to all Forum, I’m sure that somebody can help me. I know that this question is very easy. I have already implemented before systems that the distributed Interoperability between (Java - C++) is possible using CORBA. But, I need to interoperate between Java and C++ in a Local scenario, and I think that JNI can resolve my problem, but I don't know if from an C++ class can access to the methods written in java. I would like to know what is the best possibility to interoperation between this two languages, and known if JNI is more easy than java.    More>>

Hello to all Forum, I’m sure that somebody can help me.


I know that this question is very easy. I have already implemented before systems that the distributed Interoperability between (Java - C++) is possible using CORBA.




But, I need to interoperate between Java and C++ in a Local scenario, and I think that JNI can resolve my problem, but I don't know if from an C++ class can access to the methods written in java.




I would like to know what is the best possibility to interoperation between this two languages, and known if JNI is more easy than java.



   <<Less

Re: Interoperability Java - C++

Posted By:   Todd_Stout  
Posted On:   Wednesday, December 17, 2003 06:44 AM

I think you need to consider the cost
of JNI. JNI is not simple if you
need to do sophisticated things such
as asynchronously invoke Java objects
from native C++ code. In my opinion,
CORBA can be a better fit in many situations.
It is much easier to deal with when the
interaction between the C++ and Java code
is complex. CORBA also allows you to keep
your Java code pure java. This can have
a major impact if portability is important
to you (not to mention VM stability and
debugging complexity). One major advantage
of CORBA is that if you create a CORBA interface
for your java code, then it can be accessed
from many programming languages other than C++

Re: Interoperability Java - C++

Posted By:   Stephen_McConnell  
Posted On:   Tuesday, November 25, 2003 04:44 AM

I haven't done any JNI work, but I have been on jGuru for a long time; and see a lot of posts here about JNI. From reading those posts, JNI is the way to go. It allows C++ to talk to Java and vice versa.


You probabaly want to go to the JNI forum on jGuru and read some of the posts. Then check out JavaWorld in their archives. I know that have some good articles with examples on how to to JNI.


Good Luck...


Stephen McConnell

About | Sitemap | Contact