A
A
Artem Fedorushchenko2016-12-15 10:50:11
Java
Artem Fedorushchenko, 2016-12-15 10:50:11

Embedding sqlite in java application?

I decided to write a simple javafx application with data output from the database to the table. Chose SQLite. As long as the application is launched from the IDE, everything, of course, works great. The problems start with packing it into a jar file. My question is the following - how to correctly specify the path to the database located directly in the jar file itself?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Zaitsev, 2016-12-15
@dim_s

Quite simply, sqlite jdbc can load databases from the classpath through the prefix :resource:jdbc:sqlite::resource:DatabaseFile.db, DatabaseFile.db can be located inside the jar.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question