This week's book giveaway is in the Java in General forum. We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line! See this thread for details.
Calling from C to Java when using Java Accessibility
posted 15 years ago
I have been writing an accessibility application that uses a native DLL. My assistive technologies class is of course loaded using hte setting in accessibility.properties. This class loads a native DLL. Now I need to make a call back into the Java class from another native app(in Windows). Now i do this by having a thread always stay in the native part and wait for the signalling of an event by the other native app. THis is because i cannot cache the JNIenv pointer.. I dont know how to make a global ref out of that pointer. Now this thread system works but frequently hangs for mysterious reasons... I would very much like to avoid this method ... I have been looking at hte accessibility bridge code but am not able to find the method used there.. Now i dont want to use the invocation API since I am already in hte process space of a JVM. Is there some way to get a handle to a VM using hte process id or something like that ? Perhaps by using this i can solve my problem Many thanks in advance - Shyamal Bangalore