Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 528
Ranch Avatar asked Jun 01 '26 23:06

Ranch


2 Answers

A nice simple writeup written in 2010

Use Named Pipes to Communicate Between Java and .Net Processes

like image 180
used2could Avatar answered Jun 03 '26 13:06

used2could


http://jni4net.sourceforge.net/

That's probably an option for you.

This seems like a duplicate of

IPC between .NET and Java client applications

like image 41
Gordon Thompson Avatar answered Jun 03 '26 12:06

Gordon Thompson