This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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)