Call Java Method from A Second Native Thread.
Dear All,
I am working on an application to monitor the state of a device. The device monitor part is written in c as native code. The java part of this application should be notified by the native part when there is something happens. The basic work flow is:
Java: Call native function Init.
C++ : Create device monitor thread and return.
.
.
Hardware: An event happens.
C++: Be notified by Windows message loop and try to call a method in java (but how? This is my question.)
Java: A method is called by c++ part.
.
.
(when java part devide to finish the job)
Java: Call native function Exit.
C++: Destroy device monitor thread and return.
So, anybody knows how to call a java method from a second thread in the native code?
Please let me know if you have any clue.
Best regards,
Chris.

