Providing database file via resource and opening it should be possible. JDBC already offers this, but need to play around with its functionality.