All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lab.helloworld.SQLiteJDBC Maven / Gradle / Ivy

There is a newer version: 2.2.3
Show newest version
package com.lab.helloworld;

import java.sql.*;

/**
 *
 * @author youyinnn
 *
 */
public class SQLiteJDBC {

    public static void main(String[] args) {
        Connection connection;

        try {

            connection = DriverManager.getConnection("jdbc:sqlite:test.db");

            System.out.println(connection);
        }catch (Exception e){
            System.err.println(e.getClass().getName() + " : " + e.getMessage());
            System.exit(0);
        }

        System.out.println("Opened database successfully");
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy