Important: Please read the Qt Code of Conduct -

Java Classpath in Necessitas

  • Hi,
    I’m porting an application we’ve written with Qt to Android, using Necessitas. This has gone fairly smoothly, but I need to use a vendor provided Java library to access the serial port on our Android device.
    There isn’t much help available on using Java within Necessitas, particularly with add-on libraries, but I’ve been told by the vendor that I need to include the library in the manifest like this:

    @ <uses-library android:name="vendor.serial.library"

    ...and that I also need to include the library in the Java classpath, but this is where I’m stuck: I don’t know where the classpath is stored or how to update it.
    I’m also a little confused as to the location of the library: There’s a version on the device at system/framework, which is what I’ve been told to add to the classpath, but there’s also a version on my computer which is larger. How are add-on libraries managed? Do they get copied to the device from the computer when a deploy occurs?

    I've seen this: and tried to setup the environment variable (the stated CLASSPATH variable didn't actually exist on my system), but this doesn't help.

    Any help would be much appreciated!

Log in to reply