Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Using vendor-supplied JAR file with Necessitas
Forum Updated to NodeBB v4.3 + New Features

Using vendor-supplied JAR file with Necessitas

Scheduled Pinned Locked Moved Language Bindings
1 Posts 1 Posters 956 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PhilipM2
    wrote on last edited by
    #1

    Hi,
    I'm writing an application with Necessitas in Qt Creator, and need to use a vendor-supplied Jar file in order to access the serial port of the Android device. However, I'm not sure how to include the Jar file in the project so that I can use it, because when I use the following code:

    @JavaVM* currVM = (JavaVM *)QApplication::platformNativeInterface()->nativeResourceForWidget("JavaVM", 0);
    

    currVM->GetEnv( (void**)&env, JNI_VERSION_1_6);
    jclass cls = 0;
    cls = env->FindClass("com/vendor/SerialPort");
    env->ExceptionDescribe();@

    To try and get a reference to the appropriate Java class, it fails to do so, giving this message from ExceptionDescribe() : W/System.err( 2116): java.lang.NoClassDefFoundError: [generic] at dalvik.system.NativeStart.main(Native Method)

    If I try any other Java or Android class, it works correctly, so obviously I need to do something else to make the JAR available to my project when using Qt Creator - Does anybody know what? There’s plenty of information on how to do this with Eclipse, but I haven’t been able to make this work with Qt Creator at all.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved