Also there is more to the code but I believe this is the part concerning the new URL so this is all I posted.
Can anyone help me out here?
public static void main(String[] args) throws MalformedURLException, IOException {
URL url = new URL(args[0]);
String targetAgency = args[1] ;
String targetNumber = args[2] ;
while (true) {
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
Date now = new Date() ;
System.out.println(now) ;
downloadURL(connection, targetAgency, targetNumber);
try {
Thread.sleep(3600000);
}
catch (InterruptedException x){
x.printStackTrace() ;
}
connection.disconnect();
// System.exit(0);
}
}


Sign In
Create Account


Back to top









