JNI and Threads
843829Oct 14 2002 — edited Apr 23 2003I create a new Thread in Java, and in that thread, i call a native method which is blocking. In theory, the the newly created Java thread should sit in the background and wait for that JNI method to return. Instead, the entire application freezes, except the stuff being done in the JNI call. I am extending canvas, and using that canvas to draw images from a camera. I do not have the option to use JMF. The cammera images work fine, but everything else doesnt.
Any ideas?
CameraCanvas cc = new CameraCanvas();
Runnable r = new Runnable() {
public void run() {
....
cc.on(); //the blocking call in JNI
}
};
new Thread(r).start();