C++ and Java data exchange

Hello!

I didn't know where to post this message, because I didn't find apropriate part of the forum. It's related to JNI.

Well, the problem is that I have to organize data exchange between C++ program and Java program. The Java program always start first. C++ program must connect to active Java program and invoke some methods. This is two different processes, so JNI won't work.

I had an idea of using COM, but it don't looks like easy to me. I've heard that there is also such animal as CORBA. But it seems to me that it use TCP/IP, sockets and so seems to be abit slowly.

Anyway, what do you reccomend me in my case?

(may be I should post it in different branch)

Thank you.

[730 byte] By [J-inspirea] at [2007-10-3 0:54:48]
# 1
Hm,perhaps u can use a client-server Modell. Let your c connect to the java server.Another way is to write in a file, and poll it from java.Or use a database...But I think a client server would be the best.
kahraa at 2007-7-14 17:50:12 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2

Just now we have solved this problem. This feature is a part of Digital Cortex (by Composia Ltd.), see http://www.composia.com

I have developed a module in C++ with JNI that is injected to Java process, connects to Java GUI and any application (from other process) can drive Java code (read/write data from/to SWING/AWT components, do key-mouse emulation, etc.). My module does not use code written in Java. This helps me to bypass Java Security.

vitallisa at 2007-7-14 17:50:12 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3

I didn't find anything at http://www.composia.com.

Can you give this module, is it free for use?

P.S. I also wonder what do you mean by "injected to Java process"?

As far as I know, no program can write to other's process memory. If it would be possible then it would be possible to overwrite some extremely secret data and it would be security hole in the system.

J-inspirea at 2007-7-14 17:50:12 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 4

This feature a part of Composia products. My company developed Technology that makes easy the integration of different products written in various languages. To make the integration Developer need not to have source code of applications. With our technology he can develop his broker in any language (including Java) that can drive applications selected. If you want to know more ask our guys in Support Dept.

vitallisa at 2007-7-14 17:50:12 > top of Java-index,Java HotSpot Virtual Machine,Specifications...