You will need to use the JNI Java Native interface API. Quick explanation is you run javah (pretty sure that is what is is) to generate a .h file to include with C++ code. At this point you need to create a C++ native dll which will wrap those java functions. In the C++ code you will then interface with the .dll Refer to JNI documentation for specifics.
I am trying to access java classes from Objective C/C++. My attempts to create the JVM using functions found in the jni.h file have so far returned error codes < 0 which indicates an error. I have had a -3 error which I think means a version problem. I think that has been fixed, but now I have the -1 error and have found no corresponding meaning for that one. One other question I have is: can I create an object in Objective C based on a java class and invoke all the functions in that class? AND if I create more than one object in Objective C that is based on a java class how will I be able to keep the instances straight in the JVM? (if that makes any sense). If one if these objects created in ObjC based on a java class either has a return value of "object" or needs to pass a parameter that is of type "object"(non primitive data type) how is that handled? Am I making this harder than it is? if so please enlighten me. Thanks in advance DB
Conformity is the jailer of freedom and the enemy of growth.<p>JFK