String host = args[0];
String port = args[1];
String query = args[2];
System.out.println("Connecting to " + host + ":" + port);
DataSource ds = new SHPDataSource(host, Integer.parseInt(port));
Connection conn = ds.getConnection(NoCredentials.INSTANCE);
Command command = conn.createCommand(query);
command.setTimeout(120000);
System.out.println("Executing query....");
Solutions results = command.executeQuery();