title: How to fix tzdb.dat not found error in java?
body: <p>When I try to connect my gradle project with sqlite database, I have an error:</p>
  
  <pre><code>Exception in thread "main" java.lang.Error: 
  
      java.io.FileNotFoundException: null\lib\tzdb.dat (The system cannot find the path specified)
          at sun.util.calendar.ZoneInfoFile$1.run(ZoneInfoFile.java:261)
          at java.security.AccessController.doPrivileged(Native Method)
          at sun.util.calendar.ZoneInfoFile.&lt;clinit&gt;(ZoneInfoFile.java:251)
          at sun.util.calendar.ZoneInfo.getTimeZone(ZoneInfo.java:589)
          at java.util.TimeZone.getTimeZone(TimeZone.java:560)
          at java.util.TimeZone.setDefaultZone(TimeZone.java:666)
          at java.util.TimeZone.getDefaultRef(TimeZone.java:636)
          at java.util.TimeZone.getDefault(TimeZone.java:625)
          at org.sqlite.date.FormatCache.getInstance(FormatCache.java:74)
          at org.sqlite.date.FastDateFormat.getInstance(FastDateFormat.java:129)
          at org.sqlite.core.CoreConnection.&lt;init&gt;(CoreConnection.java:70)
          at org.sqlite.jdbc3.JDBC3Connection.&lt;init&gt;(JDBC3Connection.java:25)
          at org.sqlite.jdbc4.JDBC4Connection.&lt;init&gt;(JDBC4Connection.java:24)
          at org.sqlite.SQLiteConnection.&lt;init&gt;(SQLiteConnection.java:45)
          at org.sqlite.JDBC.createConnection(JDBC.java:114)
          at org.sqlite.JDBC.connect(JDBC.java:88)
          at java.sql.DriverManager.getConnection(DriverManager.java:664)
          at java.sql.DriverManager.getConnection(DriverManager.java:270)
          at repository.JdbcUtils.getNewConnection(JdbcUtils.java:39)
          at repository.JdbcUtils.getConnection(JdbcUtils.java:52)
          at repository.RepositoryLog.findOne(RepositoryLog.java:28)
          at Main.main(Main.java:28)
      Caused by: java.io.FileNotFoundException: null\lib\tzdb.dat (The system cannot find the path specified)
          at java.io.FileInputStream.open0(Native Method)
          at java.io.FileInputStream.open(FileInputStream.java:195)
          at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:138)
          at sun.util.calendar.ZoneInfoFile$1.run(ZoneInfoFile.java:255)
          ... 21 more
  </code></pre>
  
  <p>I've tried to debug it but it says that it is a timezone problem and I don't know why this issue appears. I thought that this could be a a problem because of Java10, so I also installed Java1.8 but it didn't work.</p>
  
  <pre><code>        private Connection getNewConnection()
             {
  
      //I use the driver and the url from a bd.config file and it is saved in my //variables corectly
  
                 String driver= jdbcProps.getProperty("jdbc.driver");
                 String url=jdbcProps.getProperty("jdbc.url");
                 String user=jdbcProps.getProperty("jdbc.user");
                 String pass=jdbcProps.getProperty("jdbc.pass");
  
  
                 Connection con=null;
                 try{
                     Class.forName(driver);
               //this is where my error appears
                     con= DriverManager.getConnection(url);
                 } catch (ClassNotFoundException e) {
                     e.printStackTrace();
                 } catch (SQLException e) {
                     System.out.println("Error getting connection "+e);
                  //e.printStackTrace();
                 }
                 return con;
             }
  </code></pre>
  
  <p>I expect only to connect to my database and work with the database corectly</p>