code: private static GeoPackageConnection connect(File file) {
  
  		String databaseUrl = "jdbc:sqlite:" + file.getPath();
  
  		// load the sqlite-JDBC driver using the current class loader
  		try {
  			Class.forName("org.sqlite.JDBC");
  		} catch (ClassNotFoundException e) {
  			throw new GeoPackageException(
  					"Failed to load the SQLite JDBC driver", e);
  		}
  
  		// create a database connection
  		Connection databaseConnection;
  		try {
  			databaseConnection = DriverManager.getConnection(databaseUrl);
  		} catch (SQLException e) {
  			throw new GeoPackageException(
  					"Failed to get connection to the SQLite file: "
  							+ file.getAbsolutePath(), e);
  		}
  
  		ConnectionSource connectionSource;
  		try {
  			connectionSource = new JdbcConnectionSource(databaseUrl);
  		} catch (SQLException e) {
  			throw new GeoPackageException(
  					"Failed to get connection source to the SQLite file: "
  							+ file.getAbsolutePath(), e);
  		}
  
  		// Create the GeoPackage Connection and table creator
  		GeoPackageConnection connection = new GeoPackageConnection(file,
  				databaseConnection, connectionSource);
  
  		return connection;
  	}
docs: Connect to a GeoPackage file
  
  @param file
  @return