It’s quite difficult for me to explain what I need to implement, so I really hope I am able to do it.
I have a C process which uses an ipc message queue to send and receive data. I also have a Java application which needs to send and received messages to/from that C process, so it needs access to that queue.
I’ve been searching for a way to do this and I think JNA (java natice access) could be a solution. The problem is that, apparently, I need a DLL so I can map and use the methods I need (msgget, msgsnd,msgrcv,msgctl), but I don’t know which DLL I should load. I’m quite new at this so I’m feeling lost.
Is there another way to get these two applications to communicate using message queues? Or is JNA a good solution and I only need to find the correct DLL to load?
Thanks in advance.
The use of JNA is perfectly legal, but somehow tricky.
This post “Java POSIX IPC” may have some clues as to how to do that in Java or using Java Libraries.