70 likes | 153 Views
Learn how to set up Eclipse SQLite projects with JDBC drivers for efficient database management. Follow the steps provided to import, configure, and run SQLite within the Eclipse environment.
E N D
DT249-Information Systems Research Practice-2013-14 Programming Revision Lecture 3 Lecturer: Patrick Browne
Two Eclipse Database Projects • Assume Eclipse Standard version (Kepler) https://www.eclipse.org/downloads/index-developer.php
Run SQLite • Make folder called C:\ISPR • Download the Eclipse Project from ISRP page: http://www.comp.dit.ie/pbrowne/Information%20Systems%20Research%20Practice/SQLite.7z • Unzip to C:\ISPR • Change directory or folder to C:\ISPR\SQLite • Run sqlite3.exe from command prompt or click from Windows Explorer. • Type the following at SQLite prompt .open movies.db select * from actors;
Eclipse SQLite • Import the Project. Use your default workspace. A workspace is a collection of projects held in a directory.
Eclipse SQLite • Set the classpath to point to the JDBC driver. • Use Properties External jars: C:\ISPR\SQLite • In Eclipse Project Pane navigate to Simple.java • Run as Java Application
Eclipse SQLite • In Eclipse Package Manager navigate to Simple1.java • Run as Java Application
SQLite sources • Get SQLite http://www.sqlite.org/download.html • For Windows use Precompiled Binaries for Windows • Get JDBC drivers at https://bitbucket.org/xerial/sqlite-jdbc/downloads • I used sqlite-jdbc4-3.8.2-SNAPSHOT.jar • For this project SQLite and JDBC were stored in sqlite-jdbc4-3.8.2-SNAPSHOT.jar inC:\ISPR\SQLite