How to connect to SQLite with IntelliJ Community Version?

I am almost finished writing a book on Java with the IntelliJ IDEA IDE, and the last chapter is to connect to a SQLite database. How do I perform an SQL query with the IntelliJ community edition on a SQLite database with IntelliJ community edition using Java?

If the DB Browser plugin is not compatible, is there another plugin that works with the community edition for SQLite databases?

Thanks!

have you got the jdbc driver for sqlite installed ?

you should be able to use that to connect & use the db browser

1 Like

Might be similar to PHPStorm…

image

Then click the + within Databases. Once connect then Edit Data

image

Lots of Connectors!

Hi Hal,

Thanks for the screen grabs. Unfortunately, the Database selection is not an option.

DatabaseNotShown

Is this option only available on the Ultimate version maybe?

I think its one of those things not enabled in Community TBH

I have DB browser installed and working. I don’t remember installing the jdbc driver, which means that I likely have not installed it. Do you a link to instructions for installing this driver? There are lots on google, with many being unreliable.

might be fruitless at any rate

I dont have it open and am busy working with client on some issues so cant take the time to peek

Eugene DBBrowser is for CE available. I just installed it on IntelliJIDea Community Edition. After install you can use it without any problem. Definitely.

For what you need for the DB Browser a DB Driver / Connector? I can not really understand this Idea. DBBrowser has the SQLite connector build in.

To use SQLite with your App you need to download the Connector Jar and add it to the project Libraries before you can use it. There are several tutorials for SQLite Connecting with Java.

Yes, you were right, the SQLite JDBC Driver was not installed. It works perfectly now.

Thank you!
:slight_smile:

I think you need install a db navigator plugin

Hi Trisha,

I installed Database Navigator plugin, and was not able to find an example on how to run a query with the plugin.

When using the sqlite-jdbc-3.36.0.3.jar JDBC Driver, I was able to perform a successful SQLite query with this code:

Do you have any suggestions on how to make it work with Database Navigator, or is there a specific db navigator plugin that is being used that has documentation?

Thank you :slight_smile:

I manage to use the SQL console to create a new sql statement and run it.