title: Load a SQLite3 database from a .sql file using java sqlite-jdbc
body: <p>I'm trying to put together a simple project that uses a SQLite3 database and I'm planning to use the sqlite-jdbc driver for it.</p>
  
  <p>I would prefer to create the database from a .sql file, rather than explicit commands in Java though. </p>
  
  <p>I could just create the file and manually direct the file into the database like so:</p>
  
  <pre><code>sqlite3 mydb &lt; my file.sql
  </code></pre>
  
  <p>but I would rather do it from code, perhaps by executing the .read command,  or even better via maven, (which I am also learning). So that it would be created fresh every time I built the project. </p>
  
  <p>If anyone could advise me on how to do either it would be appreciated.</p>
  
  <p>Thanks in advance</p>
  
  <p>Brad</p>