I am currently doing research for a JNI project and was wondering if anyone had any experience using JNIWrapper. So far, I have downloaded and purchased a developer license and have been trying to implement a callback (C->Java). It seems to work fine, with the exception of a glaring memory exception (something along the lines of "Exception 80000003, at 0006F890 Native function stack data: 0,49504165,6c6c6f50,0" ) as soon as the callback finishes in C and returns to Java.
This only happens when I pass a pointer to a C struct (implemented in Java with JNIWrapper's Pointer) as a parameter of the callback. This is after I have initialized all fields inside the Pointer (just a single Int type) using init(). The Pointer is initialized with the size of the struct by passing the class it points to as it's constructor argument. Am I not allocating memory properly, or does JNIWrapper not handle the Pointer type very well?
I have contacted support at JNIWrapper, but their time difference (GMT+2?) makes it difficult to communicate with them. We have passed our code back and forth a few times, but it is very slow. Any help would be appreciated, since the project is quite time-critical. Thanks in advance. [ September 12, 2005: Message edited by: C. C. ]
This is a very strange approach to call JNI SDK from java code. Why do not write the native code in C++? The only problem is that JNI SDK is not friendly and very difficult in use. This problem can be solved in the way other then JNIWrapper. For four years I have been developing Object Oriented JNI SDK and Add-In for Microsoft VC++ 7.1. This tool generates C++ JNI class wrapplers for java classes selected (in bytecode format). JNI programming become Object Oriented, all JNI specifics are generated and wrapped. The demo version of OOJNI Add-In for MS VC++ 7.1 is available at http://shareware.pcmag.com/product.php[id]90910[SiteID]pcmag http://simtel.net/product.php[id]90910[SiteID]simtel.net
subject: Anyone have any experience with JNIWrapper?