code: public void process(String driverClass, String connectionString, String projectID, String outputFile) throws Exception
     {
        System.out.println("Reading Primavera database started.");
  
        Class.forName(driverClass);
        Properties props = new Properties();
  
        //
        // This is not a very robust way to detect that we're working with SQLlite...
        // If you are trying to grab data from
        // a standalone P6 using SQLite, the SQLite JDBC driver needs this property
        // in order to correctly parse timestamps.
        //
        if (driverClass.equals("org.sqlite.JDBC"))
        {
           props.setProperty("date_string_format", "yyyy-MM-dd HH:mm:ss");
        }
  
        Connection c = DriverManager.getConnection(connectionString, props);
        PrimaveraDatabaseReader reader = new PrimaveraDatabaseReader();
        reader.setConnection(c);
  
        processProject(reader, Integer.parseInt(projectID), outputFile);
     }
docs: Extract Primavera project data and export in another format.
  
  @param driverClass JDBC driver class name
  @param connectionString JDBC connection string
  @param projectID project ID
  @param outputFile output file
  @throws Exception