code: public static void registerSpatialTables(Connection connection) throws SQLException {
          Statement st = connection.createStatement();
          st.execute("drop view if exists geometry_columns");
          st.execute("create view geometry_columns as select TABLE_CATALOG f_table_catalog,TABLE_SCHEMA f_table_schema,TABLE_NAME f_table_name," +
                  "COLUMN_NAME f_geometry_column,1 storage_type,_GeometryTypeFromConstraint(CHECK_CONSTRAINT || REMARKS, NUMERIC_PRECISION) geometry_type," +
                  "_DimensionFromConstraint(TABLE_CATALOG,TABLE_SCHEMA, TABLE_NAME,COLUMN_NAME,CHECK_CONSTRAINT) coord_dimension," +
                  "_ColumnSRID(TABLE_CATALOG,TABLE_SCHEMA, TABLE_NAME,COLUMN_NAME,CHECK_CONSTRAINT) srid," +
                  " _GeometryTypeNameFromConstraint(CHECK_CONSTRAINT || REMARKS, NUMERIC_PRECISION) type" +
                  " from INFORMATION_SCHEMA.COLUMNS WHERE TYPE_NAME = 'GEOMETRY'");
          ResultSet rs = connection.getMetaData().getTables("","PUBLIC","SPATIAL_REF_SYS",null);
          if(!rs.next()) {
          	InputStreamReader reader = new InputStreamReader(
  					H2GISFunctions.class.getResourceAsStream("spatial_ref_sys.sql"));
  			RunScript.execute(connection, reader);
  				
  			try {
  				reader.close();
  			} catch (IOException e) {
  				e.printStackTrace();
  			}
          }
      }
docs: Register view in order to create GEOMETRY_COLUMNS standard table.
  @param connection Open connection
  @throws java.sql.SQLException