4

I'm trying to add an embedded database to my application, but I have no clue where to begin. So far I've found that I should download the sqlite-jdbc driver and add the .jar to my project. From there I'm kind of lost, are there any good tutorials to get me started or some helpful tips?

Also, I'm using Eclipse for my IDE, so if there's anything within there that will simplify the process, feel free to add that as well!

5
  • 1
    Instead of dealing with all the nasty dependency resolving by bare keyboard, I recommend using Maven... That makes things a lot easier. And also, doing research, for example entering Java sqlite embedded tutorial into a proper search engine yields results like this one Commented Jul 31, 2013 at 20:27
  • Yes, I'm smart enough to have searched this multiple times and ways. But how does that show whether that's embedded or not? It could be a standalone install of SQLite right? Or maybe I'm just misunderstanding how SQLite works. Commented Jul 31, 2013 at 20:45
  • People usually go for something like Apache Derby when they want an embedded db in a Java application. Commented Jul 31, 2013 at 20:57
  • And there's no such thing as a standalone install of SQLite AFAIK. Commented Jul 31, 2013 at 20:58
  • You may find a pure Java DB (i.e. H2, HSQLDB, Apache Derby see stackoverflow.com/questions/17897551/…) a better fit than SQLite. Commented Jul 31, 2013 at 23:04

1 Answer 1

3

You want dependency management here? Read up on Maven (very easy), write a Maven pom.xml file and load it into Eclipse that way. Eclipse and NetBeans understand Maven very well now. No need to learn an Eclipse-specific way to do this since Maven will work as well in NetBeans as Eclipse and is simple to run on the command line too.

Based on what search.maven.org says, your dependency in Maven would be this added to a standard pom file to get the latest:

<dependency>
    <groupId>org.xerial</groupId>
    <artifactId>sqlite-jdbc</artifactId>
    <version>3.7.15-M1</version>
</dependency>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.