Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set up SQLite for Java under Ubuntu?

I would like to use SQLite for some database functionality with a Java program I am implementing, but I don't know how to install SQLite and make it work with Java under Ubuntu.

Any help is appreciated

like image 979
temelm Avatar asked Oct 10 '22 04:10

temelm


2 Answers

You will need a JDBC driver for SQLite in order to access it from your java app.

Then, to set up sqlite under ubuntu apt-get install cl-sql-sqlite3 sqlitebrowser.

Sqlite browser is quite practical. Nevertheless, I would suggest you consider that sqlite is not the easiest way to deploy a java database. You should have a look at javadb.

like image 120
Snicolas Avatar answered Oct 12 '22 17:10

Snicolas


I'd recomment SQLJet.

What is SQLJet

SQLJet is an independent pure Java implementation of a popular SQLite database management system. SQLJet is a software library that provides API that enables Java application to read and modify SQLite databases.

Check out their tutorial.

To install, just download the Library and add it to your classpath.

like image 42
dertkw Avatar answered Oct 12 '22 17:10

dertkw