jni

Java: how to disable mouse and keyboard system wide

Alright, I am not sure if this is even possible with Java specifically, but I am working on a a small program very similar to synergy and I need to be able to completely disable input from the mouse and keyboard on the host computer, but still record the input within the program. I can not think of any clean and robust ways to do this w...

Problem invoking jni on AIX

Hi i am writing program where C will call Java static method using JNI. Program works well on Solaris, Linux but on AIX it dumps the core Analyzing the core is not giving any info unfortunately, crash is happend in below function. any clue ? Anyone has successfully called this stuff on aix ? (i am using jdk 1.4) res = JNI_CreateJava...

How to save XImage as bitmap?

Hello, i'm trying to create JNI C++ library that will capture desktop video (frames). First step is to simply make a screenshot of desktop. Code is : #include <iostream> #include <X11/Xlib.h> using namespace std; int main() { Display *display; int screen; Window root; display = XOpenDisplay(0); ...

Java app able to load library but can't find function (visual c++ name mangling?)

This is my first time using JNI. I need to call a third-party Visual C++ library from a Java program, so I wrote a wrapper in Visual C++. The library loads fine, but when I try to call a function from my wrapper library, I get the dreaded UnsatisfiedLinkError. My wrapper includes the .h file created by javah, and has the following in ...