unable to call c++ jni method from java!!!!
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ash1412
Posted On:   Sunday, July 8, 2012 11:21 PM

Hi All, I have implemented C++ JNI wrapper.  Below is my few lines of C++ code, after compilation generated lib copied to /usr/lib. JNIEXPORT void JNICALL Java_biz_freesystems_h323_H323Interface_testCall(JNIEnv *env, jobject obj) {     cout << "------------Messages form C++-----------" << endl;     return; } and my java Code (using above lib in my java): public long acceptCall(String conferenceId, String user) {         System.out.println("---------Inside Accept Call-----------");         this.testCall();    More>>

Hi All,

I have implemented C++ JNI wrapper. 

Below is my few lines of C++ code, after compilation generated lib copied to /usr/lib.

JNIEXPORT void JNICALL Java_biz_freesystems_h323_H323Interface_testCall(JNIEnv *env, jobject obj)
{
    cout << "------------Messages form C++-----------" << endl;
    return;
}



and my java Code (using above lib in my java):

public long acceptCall(String conferenceId, String user) {
        System.out.println("---------Inside Accept Call-----------");
        this.testCall();
        System.out.println("---------Going out from Accept Call-----------");
        return 1;
    }



above java acceptCall is being executed and both messages are printing but unable to call the C++ JNI wrapper (testCall).
Can any one please help me to debug the problem.



Thanks in Advance
Ashwani

   <<Less
About | Sitemap | Contact