r/javahelp • u/[deleted] • Aug 23 '19
Distributing java app that utilizes JDBC
Hi, all
So I've created a application for my fantasy football league that utilizes a database that I've created on my local machine. In my java source code I query the database using JDBC. I know that a jar file is used to distribute java apps to other people, but I am confused as to how to distribute the database portion of the app.
17
Upvotes
3
u/johnmc325 Aug 23 '19
You didn't say if all the distributed apps should use a single database or if they should each use their own version. Makes a difference to the answer.
If everyone needs to use the same database then as others have said you need to provide a database accessible from the web like in the cloud.
If each needs their own then look at embedded databases, where you app creates and uses the database for each instance. If this is what you want then take a look at my worked example of this to give you an idea of what to do. http://softwarepulse.co.uk/tutorials/java-with-sqlite-embedded-database/