Package org.sqlite

Class SQLiteJDBCLoader


  • public class SQLiteJDBCLoader
    extends java.lang.Object
    Set the system properties, org.sqlite.lib.path, org.sqlite.lib.name, appropriately so that the SQLite JDBC driver can find *.dll, *.dylib and *.so files, according to the current OS (win, linux, mac).

    The library files are automatically extracted from this project's package (JAR).

    usage: call initialize() before using SQLite JDBC driver.

    Author:
    leo
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SQLiteJDBCLoader.VersionHolder
      This class will load the version from resources during .
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int getMajorVersion()  
      static int getMinorVersion()  
      static java.lang.String getVersion()  
      static boolean initialize()
      Loads SQLite native JDBC library.
      static boolean isNativeMode()
      Checks if the SQLite JDBC driver is set to native mode.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SQLiteJDBCLoader

        public SQLiteJDBCLoader()
    • Method Detail

      • initialize

        public static boolean initialize()
                                  throws java.lang.Exception
        Loads SQLite native JDBC library.
        Returns:
        True if SQLite native library is successfully loaded; false otherwise.
        Throws:
        java.lang.Exception
      • isNativeMode

        public static boolean isNativeMode()
                                    throws java.lang.Exception
        Checks if the SQLite JDBC driver is set to native mode.
        Returns:
        True if the SQLite JDBC driver is set to native Java mode; false otherwise.
        Throws:
        java.lang.Exception
      • getMajorVersion

        public static int getMajorVersion()
        Returns:
        The major version of the SQLite JDBC driver.
      • getMinorVersion

        public static int getMinorVersion()
        Returns:
        The minor version of the SQLite JDBC driver.
      • getVersion

        public static java.lang.String getVersion()
        Returns:
        The version of the SQLite JDBC driver.