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!

calling jni methods while in native critical section

843829Apr 24 2006 — edited Apr 26 2006
Hello,

I'm experimenting with modifiying our Windows application such that the front end graphical interface is recoded in Java and the existing back-end calculation engine remains in C/C++ code.

The calculation engine is implemented such that if the computer has one cpu, the execution is performed without use of any critical sections (at least in the calculation engine). If the computer has more than one processor, various segments in the code execute in parallel; using boost::mutex, and various other boost classes, to permit each thread to report information/progress.

The calculation engine is currently being compiled for Windows and Linux platforms. On both Linux and Windows, it appears that calling back to the Java graphical end through JNI calls, while in a native critcal section, causes a crash in the virtual machine. It is probably worth noting that on the Java side, the object that is called back to is an extension of the Thread class.

Is continuing to use a native critial section concurently with calls through JNI incorrect?

Thank you for any assistance,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 24 2006
Added on Apr 24 2006
4 comments
432 views