I posted that in a haste. actually this is dragging since 1 month.. some kind of uneasiness in me.
ok fine then,
i'm using Linux. I have to create a interface for a softphone project( done in c++) in java using JNI and swings.
i tried for month and couldn't get it right.
last thursday we e-mailed to one guy who said he has done softphone interface in JAVA using JNI(just as our requirements)
he replied, in his coding he used SWIG to generate all the wrapper classes. so we moved on to SWIG.
we are just running the sample program available in google. once we succesfully run this we plan to move to our main cpp program to create wrapper classes with SWIG.
so, we downloaded the.tar SWIG file and extracted.
my c program is
my interface program is,
then i give the command
swig -java example.i
it runs and generates the files,
the I compile the example.c and example_wrap.c files with the command
it is saying "example.h" : no such file or directory in both the example.c file and the example_wrap.c file.
so i removed that.
now i created the .so file and placed that in /usr/lib folder. this is to be done because the .so file is read from that path....
now i created a java main file (main.java) as in the above link. i compiled it too with out errors.. but when running it is showing the error in My_variable..
Exception in thread "main" java.lang.UnsatisfiedLinkError: exampleJNI.My_variable_get()D
at exampleJNI.My_variable_get(Native Method)
what that signifies..
i'm just suing that sample program...
thanks in advance
If tomatoes are a fruit, then ketchup must be a jam. Taste this tiny ad: