Reputation: 62746
I need to pass a signal from a .NET app to a Java app. No data is required, the signal itself is enough.
The most simple way that comes to my mind is by using a named synchronization object like this:
At least, this how I would do it if I knew how to create a named synchronization object in Java.
But looks like Java does not have any, which I find hard to believe. Does it mean that only Windows has named synchronization objects?
So, my question is this - how do I pass a simple signal (no data) from a non Java app to a Java app on Windows? Both processes run on the same host.
EDIT
Motivation - I want to signal to our headless Java process to terminate itself gracefully as soon as it can do so.
Upvotes: 0
Views: 195
Reputation: 62746
For God's sake, I just want a single 1 bit signal from a C++/C# process to a Java process and there is no simple way to do it. I can't believe it.
Forget about it, I'll just use the file system. The C++/C# code is going to create an empty file at a well known location, which the Java code is going to poll every second.
Finito, end of story.
Upvotes: 0
Reputation: 3749
I second thought, that i had done before by using ICE Framework, you can download and learn the ICE Framework from here, ICE Framework is a cross framework for communication between processes a local system or on a network.
Upvotes: 0
Reputation: 3749
you can create a socket connection between your programs, and by send and receive specific pattern you can detect signal
Upvotes: 3