URLs = new String[0]; } else if (args.length!=0) { System.err.println("usage: java [offline]");
dburls = new String[0]; } else if (args.length == 3) { System.out.println("Performing offline and online tests"); dburls = args[0].split(";"); dbuser = args[1]; dbpass = args[2]; } else { System.err.println("Usage: java examples/TestParser dburls user pass [tablename]"); System.err.println("   or: java examples/TestParser offline"); System.err.println(); System.err.println("dburls has one or more jdbc urls separated by ; in the following format"); System.err.println("jdbc:postgresql: System.err.println("tablename is 'jdbc_test' by default.");
    public static void main(String[] args) throws SQLException, ClassNotFoundException {        String[] URLs = databases;        // allow to run offline tests...        if (args.length == 1 && args[0].equalsIgnoreCase("offline")) {            System.out.println("Performing only offline tests");            URLs = new String[0];        } else if (args.length!=0) {            System.err.println("usage: java [offline]");            System.exit(1);        }        Connection[] conns;        conns = new Connection[URLs.length];        for (int i = 0; i < URLs.length; i++) {            System.out.println("Creating JDBC connection to " + URLs[i]);            conns[i] = connect(URLs[i]);        }        System.out.println("Performing tests...");        System.out.println("***");        for (int i = 0; i < testset.length; i++) {            test(testset[i], conns);            test(testsridset[i], conns);        }        System.out.print("cleaning up...");        for (int i = 0; i < conns.length; i++) {            conns[i].close();        }        System.out.println("Finished.");    }