|
-
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks