java - C JNI help with complex code -


dev env: ubuntu 10.10 (32-bit), eclipse, openjdk

i have code executable written in c. need modify convert .so library , access functions java code.

currently, c code comprises 3 headers , 3 source files (.c). need call main function , pass 2 strings java. rest of functions called within main(). unfortunately, 1 of other functions prints results command line. how implement jni pass 2 strings , return particular result?

i found examples on web found them simplistic. fail locate jni.h header use.

would use jniexport int jnicall java_ppldtct_main(jnienv*,jobject,jstring,jstring) instead of int main(int argc,char** argv) in c?

all appreciated.

thank you

if understand correctly, trying minimal changes in existing code.

if that's case, may try overwrite file descriptor 1 ( stdout ) pipe , output of program way.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -