Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JNI and Threads

843829Oct 14 2002 — edited Apr 23 2003
I 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();
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 21 2003
Added on Oct 14 2002
8 comments
571 views