Name | Modified | Size | Downloads / Week |
---|---|---|---|
readme | 2014-10-29 | 1.2 kB | |
JniAnnotationProcessor.zip | 2014-10-29 | 25.6 kB | |
Totals: 2 Items | 26.8 kB | 0 |
Add file JniAnnotationProcessor.jar to java project libs. JNI Export Example: @JniClass(path = "/JniTestCpp/Test") //path to c++ project and name of file without .xxx public class Test { //load compined c++ lib static { System.load("/JniTestCpp/dist/Debug/GNU-Linux-x86/libJniTestCpp.so"); } //firs call init public Test() { init(); } //export method @JniMethod public native String test(boolean b, Test1 trieda, String s, int a); //export init method @JniMethod @JniInitMethod public native void init(); //export callBack from c++ side @JniCallBack public String addRecord( String s) { System.out.println(s); return "sss"; } } Java class Export Example: @JniClassExport(path = "/JniTestCpp/TestClass") //path to c++ project and name of file without .xxx public class Test1 { //export field @JniFieldExport private Test3 count; private int value; //export method @JniMethodExport public int getValue() { return value; } //export method @JniMethodExport public void setValue(int value) { this.value = value; } } And compine java project..