Important: Please read the Qt Code of Conduct -

Using Java code snippet in Qt Creator

  • Hi guys,

    I know this is a weird question to ask .. but I am testing a tab for FTDI support... and I want to run this piece of code in Qt creator ( have been told not to use eclipse)

    I have implemented jni , but I dont think I can run java functions using jni.

    This is my code :
    UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);

    // Find the first available driver.
    UsbSerialDriver driver = UsbSerialProber.acquire(manager);

    if (driver != null) {;
    try {

    byte buffer[] = new byte[16];
    int numBytesRead =, 1000);
    Log.d(TAG, "Read " + numBytesRead + " bytes.");

    } catch (IOException e) {
    // Deal with error.
    } finally {
    } @

    Can somebody please tell me how to get this code up and running in Qt creator ?

Log in to reply