JNI++ |
|||||||||||||||||||||||||||||||||||||||
Java/C++ subclassing |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
CALL FOR COLLABORATION! |
|||||||||||||||||||||||||||||||||||||||
Dear Javaers,
from several forums I realized that it seems to be a quite common task to re-use existing C++ object libraries from Java. There is documentation about how to do such a thing with JNI. Furthermore, Rob Gordon's book "Essential JNI" contains a chapter named "Java and C++" as well as one with title "Conversion of C Structures". The downloadable accompanying software contains a tool called structConverter for translation of C structures to Java JNI. This is a good starting point, but... ... all this tells only one half of the story. It serves quite well in calling C++ libraries from Java using JNI. Unfortunately, it does not tell much about how to handle callbacks (i.e. virtual functions). The aim, however, should be to allow full Java subclassing of C++ superclasses including overriding virtual C++ functions by Java methods. ... the tools are related to C instead of C++. What one needs is a generator which parses C++ class definitions and creates the corresponding Java proxies, JNI C++ code, and C++ adapter classes on the fly. All this with full support of Java/C++ type conversion. Since I didn't find something fitting with these aims, I would like
Now for a really big problem: As it goes for the most of us, I'm not in the position to attach enough working power to JNI++ as would be necessary to make it running soon. It would be really nice if someone joins or even co-founds this project. That is at least for two reasons: joining the brains and sharing the efforts. Everybody and everything is welcome... Looking forward to your comments, |