This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
It's quite difficult for me to explain what I need to implement, so I really hope to be able to do it.
I have a C process which uses an ipc message queue to send and receive data. And I have a Java application which needs to send and received messages to/from that C process, so it needs to access to that queue. I've been searching a way of doing this and I think JNA (java natice access) could be a solution. The problem is that, aparently, I need a DLL so I could map and use the methods I need (msgget, msgsnd,msgrcv,msgctl), but I don't know what DLL I should load. I'm quite new at this so I'm feeling lost.
Is there another way of communicate this two applications using message queues? Or is JNA a good solution and I only need to find the correct DLL to load??
Ana, you're combining some complex stuff into one problem. May I suggest that you break it up into smaller parts? One way to do that would be to have all of your IPC and interprocess communication done in C++, and use the Java Native Interface ("JNI") to let your Java code call some C++ routines to communicate with the rest of your C++ code. JNI is a bit messy at first, but you do get used to it.
I do a lot of work with the JNI, so feel free to ask questions here; I'll help if I can.
Joined: Aug 08, 2012
Thank you very much for your answer.
Finally, I was able to make it run. I found out that "sys/ipc.h", "sys/msg.h" and "sys/types.h" are part of the C POSIX Library (http://en.wikipedia.org/wiki/C_POSIX_library), so I loaded it