9

I'm wondering if I can access to a Posix Message Queue in Java as I have an application that can't be modified and uses a message queue to talk to other processes. Is there any api or package that do that? I know that I can use JNI but I need to do this ASAP so no time to develop that.

Regards.

Matthew Flaschen
  • 278,309
  • 50
  • 514
  • 539
  • 1
    Possible duplicate of [Is there a Java library of Unix functions?](https://stackoverflow.com/questions/1088113/is-there-a-java-library-of-unix-functions) – user7610 Feb 15 '18 at 18:03

2 Answers2

7

A bit of Googling found Posix for Java.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
  • 1
    yep, thanks i was looking that a few minutes ago, i will see if this helps, thanks a lot for your time. –  Feb 17 '10 at 05:02
4

Take a look at JNA at GitHub (latest JavaDoc). Quoting the project's description:

JNA provides Java programs easy access to native shared libraries (DLLs on Windows) without writing anything but Java code—no JNI or native code is required. This functionality is comparable to Windows' Platform/Invoke and Python's ctypes. Access is dynamic at runtime without code generation.

Several projects are using it, including IntelliJ IDEA, Cassandra, and Netbeans.

David J. Liszewski
  • 10,959
  • 6
  • 44
  • 57