Which package provides SQLite driver for OpenJDK-11?

Jeffrey Walton noloader at gmail.com
Thu Mar 16 20:45:38 UTC 2023


Hi Everyone,

I'm working on Ubuntu 20.04.6, x86_64, fully patched. I installed
openjdk-11-jdk (among other dev tools).

I've got a small Java test program that is failing at runtime with an
error. The part of the program causing the exception is:

    final String connString = "jdbc:sqlite:Chinook.db";
    Connection conn = DriverManager.getConnection(connString);

The exception string is:

    java.sql.SQLException: No suitable driver found for jdbc:sqlite:Chinook.db

Some online searching indicates the driver may be missing.
(Corrections, please).

Unfortunately, I can't find a driver for SQLite:

    $ apt-cache search sqlite | grep -i -E 'openjdk|java'
    libsqljet-java - Pure Java implementation of SQLite database
management system
    libsqljet-java-doc - API documentation for libsqljet-java

What package should I install for the SQLite driver?

Thanks in advance.



More information about the ubuntu-users mailing list