Native Library & "Make" errors

tabman
2006-07-28
2013-04-15
  • tabman

    tabman - 2006-07-28

    When I ran my project in Eclipse it gave me an error  of "AvetanaBT Native Library not in CLASSPATH". I think its talking about the "libjbluez.so" file

    So I executed the "make" command to generate the "libjbluez.so" file. But I get so many errors in a file at /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h

    I'm pasting some of the errors here:

    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:27:20: error: jni_md.h: No such file or directory
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:45: error: ‘jint’ does not name a type
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:104: error: ‘jbyte’ does not name a type
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:107: error: ‘jint’ does not name a type
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:108: error: ‘jlong’ does not name a type
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:193: error: ‘JNICALL’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:193: error: ISO C++ forbids declaration of ‘jint’ with no type
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:193: error: ‘jint’ declared as function returning a function
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:195: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:198: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:201: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:203: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:206: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:209: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:211: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:214: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:217: error: ‘JNICALL’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:218: error: ISO C++ forbids declaration of ‘jint’ with no type
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:218: error: ‘jint’ declared as function returning a function
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:218: error: ‘int JNINativeInterface_::jint(int*)’ cannot be overloaded
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:193: error: with ‘int JNINativeInterface_::jint(int*)’
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:219: error: ‘JNICALL’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:220: error: ISO C++ forbids declaration of ‘jint’ with no type
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:220: error: ‘jint’ declared as function returning a function
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:220: error: ‘int JNINativeInterface_::jint(int*)’ cannot be overloaded
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:193: error: with ‘int JNINativeInterface_::jint(int*)’
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:221: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:223: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:225: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:227: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:230: error: ‘JNICALL’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:231: error: ‘jint’ is not a type
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:231: error: ISO C++ forbids declaration of ‘jint’ with no type
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:231: error: ‘jint’ declared as function returning a function
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:231: error: ‘int JNINativeInterface_::jint(int*)’ cannot be overloaded
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:193: error: with ‘int JNINativeInterface_::jint(int*)’
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:232: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:235: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:237: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:239: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:241: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:243: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:245: error: ‘JNICALL’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:246: error: ‘jint’ is not a type
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:246: error: ISO C++ forbids declaration of ‘jint’ with no type
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:246: error: ‘jint’ declared as function returning a function
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:246: error: ‘int JNINativeInterface_::jint(int*)’ cannot be overloaded
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:193: error: with ‘int JNINativeInterface_::jint(int*)’
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:248: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:250: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:252: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:254: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:257: error: expected `)' before ‘*’ token
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:259: error: expected `)' before ‘*’ token

    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:1659: error: ‘jint’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:1663: error: ‘jbyte’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:1664: error: ‘jint’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:1669: error: ‘jint’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:1674: error: ‘jint’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:1678: error: ‘jint’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:1679: error: ‘jint’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:1683: error: ‘jlong’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:1684: error: ‘jint’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:1689: error: ‘jint’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:1694: error: ‘jint’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:1699: error: ‘jsize’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:1699: error: ‘jsize’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:1703: error: ‘jsize’ has not been declared
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:1703: error: ‘jsize’ has not been declared

    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h: In member function ‘_jclass* JNIEnv_::DefineClass(const char*, _jobject*, int)’:
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:759: error: ‘const struct JNINativeInterface_’ has no member named ‘DefineClass’
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:759: error: ‘buf’ was not declared in this scope
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:759: error: ‘len’ was not declared in this scope
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h: In member function ‘_jclass* JNIEnv_::FindClass(const char*)’:
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:762: error: ‘const struct JNINativeInterface_’ has no member named ‘FindClass’
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h: In member function ‘_jmethodID* JNIEnv_::FromReflectedMethod(_jobject*)’:/usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:765: error: ‘const struct JNINativeInterface_’ has no member named ‘FromReflectedMethod’
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h: In member function ‘_jfieldID* JNIEnv_::FromReflectedField(_jobject*)’:
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:768: error: ‘const struct JNINativeInterface_’ has no member named ‘FromReflectedField’
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h: In member function ‘_jobject* JNIEnv_::ToReflectedMethod(_jclass*, _jmethodID*, jboolean)’:
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:772: error: ‘const struct JNINativeInterface_’ has no member named ‘ToReflectedMethod’
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h: In member function ‘_jclass* JNIEnv_::GetSuperclass(_jclass*)’:
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/jni.h:776: error: ‘const struct JNINativeInterface_’ has no member named ‘GetSuperclass’

    de_avetana_bluetooth_stack_BlueZ.h:167: error: ‘JNIEXPORT’ does not name a type
    de_avetana_bluetooth_stack_BlueZ.h:175: error: ‘JNIEXPORT’ does not name a type
    de_avetana_bluetooth_stack_BlueZ.h:183: error: ‘JNIEXPORT’ does not name a type
    de_avetana_bluetooth_stack_BlueZ.h:191: error: ‘JNIEXPORT’ does not name a type
    de_avetana_bluetooth_stack_BlueZ.h:199: error: ‘JNIEXPORT’ does not name a type
    de_avetana_bluetooth_stack_BlueZ.h:207: error: ‘JNIEXPORT’ does not name a type
    de_avetana_bluetooth_stack_BlueZ.h:215: error: ‘JNIEXPORT’ does not name a type

    make: *** [libavetanaBT.so] Error 1

     
    • tabman

      tabman - 2006-07-28

      Ok I found out the problem. Those who are developing Avetana should fix it.

      While doing the "make" the compiler looks for a file 
      jni_md.h in the directory:

      /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/

      when the file is actually present in the directory:
      /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/include/linux

      I copied the file to the directory it looks into the file for and it compiled successfully.

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks