views:

77

answers:

2

I have a process written in C++ that raises a named event using CreateEvent. Is there a java implementation of the WaitForSingleObject function?

Is there a better way to pass events between a C++ or .NET process and a Java process?

(I am aware of the option to use JNI to wrap whatever calls I want. I am looking for a library that already took care of it.)

thanks,

Ariel

A: 

There is no such API in the standard Java API, because that's a highly platform-specific Windows thing (and Java is platform-independent, so you won't find such Windows-only functionality in Java's standard API).

You could write some code in C++ and call it from your Java program using JNI.

Jesper
+1  A: 

Technolgies which might be useful:

  • Java Native Access (JNA) provides Java programs easy access to native shared libraries (DLLs on Windows) without writing anything but Java code—no JNI or native code is required.

  • Message oriented Middleware which includes C/C++ drivers, for example Apache ActiveMQ, OpenMQ or xmlBlaster

mjustin