Ensure you include the JAR in classpath and explicitly load:
dependencies implementation 'org.xerial:sqlite-jdbc:3.72.0'
(save as TestSQLite.java ):
<dependency> <groupId>org.xerial</groupId> <artifactId>sqlite-jdbc</artifactId> <version>3.72.0</version> </dependency> Note: Replace 3.72.0 with 3.72.1 or the exact version you need. mvn clean install Maven will download sqlite-jdbc-3.72.0.jar from Maven Central into your local repository ( ~/.m2/repository/org/xerial/sqlite-jdbc/3.72.0/ ). 3.3 Verify Check your local Maven cache or run:
Then run:
# Linux / macOS / Git Bash on Windows wget https://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/3.72.0/sqlite-jdbc-3.72.0.jar Or with curl:
import java.sql.*; public class VerifySQLiteJDBC public static void main(String[] args) try (Connection conn = DriverManager.getConnection("jdbc:sqlite::memory:")) DatabaseMetaData meta = conn.getMetaData(); System.out.println("JDBC Driver version: " + meta.getDriverVersion()); System.out.println("SQLite JDBC library version: " + meta.getDatabaseProductVersion()); download sqlitejdbc372jar install
Introduction If you’ve landed on this page, you’re likely working on a Java project that requires a lightweight, embedded database. SQLite is the world’s most widely used database engine, and the sqlite-jdbc library is the magic bridge that allows Java applications to interact with SQLite databases without any native binaries or separate installation steps.