问题
I am creating a framework whereby programs written in different languages can share an event structure based on named system mutexes in Windows.
I've got it working perfectly in C#. Multiple apps can listen for and signal various events, and other apps can catch them, react, etc.
The idea is that programs written in any of the various languages we use where I work (such as Java and others) can fit themselves into this system as long as they play within the rules of this event structure.
How can I "see" a system mutex created by another application in a Java application (or create one in the Java app for that matter)? I thought it'd be easy (it is in C#), but I'm not finding it. Others are saying there's no way because in Java you're wrapped in the JVM. Surely there's a way, though, right?
来源:https://stackoverflow.com/questions/41866893/how-to-consume-a-system-mutex-shared-by-c-sharp-and-java-programs