Search code examples
c#javaeventsfilesystemwatcher

Passing event from C# application to Java application


I have a Java application that launches a small C# application on the client machine.

I need a simple solution for passing events between the C# and the Java applications.

To handle the opposite direction (Java->C#) I was using FileSystemWatcher, which listens to folder change events. The Java application writes an empty file to a shared folder, and the C# app handles these events according to the (empty) file name (and then removes it from the "queue"). Could not find a Java equivalent to FileSystemWatcher to solve the problem of passing events from C# to Java.

Any creative idea ? (reminder: this is just a Java application so I have no Apache server or something like that).

Thanks


Solution

  • A nice simple writeup written in 2010

    Use Named Pipes to Communicate Between Java and .Net Processes