How to consume a system mutex shared by C# and Java programs?

断了今生、忘了曾经 提交于 2019-12-12 04:35:00

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!