Establish Connectivity between Java and SQLite


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Establish Connectivity between Java and SQLite

  1. #1
    Join Date
    Dec 2005
    Posts
    1

    Establish Connectivity between Java and SQLite

    Hi,

    I m trying to establish connectivity between java and SQLite.

    This is the code :



    import java.sql.*;
    public class get
    { public static void main(String[] args) { String url = "jdbc:sqlite:/E:/SQL Lite DB/keywording/keywording.db"; Connection con; String query = "select * from THESAURUS_SYNONYM"; Statement stmt; try { Class.forName("SQLite.JDBCDriver"); } catch(Exception e) { e.printStackTrace(); } } }




    I have set Classpath for sqlite.jar file like :
    java -cp E:\SQL Lite DB\sqlite.jar

    It is giving error:
    java.lang.ClassNotFoundException: SQLite.JDBC2y.JDBCConnection

    I have opend jar file and see that this jar file contain package name JDBC2x and classes.
    I have changed name of package to JDBC2y and make jar file and then use it but it is not working.

    Please tell how can i get suitable jar file for this program. Tell me whole process for establishing connection between java and SQLite. Tell me some useful links for codes that establish connection between java and SQLite.

    Please reply me in detail.

    Thanks & Regards
    Nitin

  2. #2
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    255
    Already replied on JavaRanch.
    Happiness is good health and a bad memory.

  3. #3
    Join Date
    Dec 2005
    Posts
    10
    Hi all,

    I am new to this forum. Can you guyz please give some ideas to improve this website in terms of contents and look n feel.
    http://javainterviewquestions.50webs.com/

    Regards
    Vivek

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center