Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question