wood burning stoves 2.0*
The moose likes Java in General and the fly likes Calling from C to Java when using Java Accessibility Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Calling from C to Java when using Java Accessibility" Watch "Calling from C to Java when using Java Accessibility" New topic
Author

Calling from C to Java when using Java Accessibility

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Calling from C to Java when using Java Accessibility
 
Similar Threads
JSP loading a dll
Invoking methods within a DLL written in VB
Can't find dependent libraries
Not able to find .dll file in my java path
JAR inclues native code