import java.net.*;
import java.io.*;
public class Arachnid{
public static String[] aWeb = {"www.neowin.net", "www.planethalflife.com"};
public static void main(String[] args) {
for (int i = 0; i<aWeb.length; i++) {
System.out.println(aWeb[i]);
Spider spider = new Spider(new URL(aWeb[i])); // <------ MALFORMEDURL OCCURS HERE
}
}
}
/* the constructor i am using, my problem doesnt currently exist with this*/
class Spider extends Thread {
public URL web;
// ....
public Spider(URL w) {
web = w;
}
}
i have tried replacing aWeb with each individual address and the same error occurs
i have also tried outputting the values of aWeb to console
Question
Daem0hn
import java.net.*; import java.io.*; public class Arachnid{ public static String[] aWeb = {"www.neowin.net", "www.planethalflife.com"}; public static void main(String[] args) { for (int i = 0; i<aWeb.length; i++) { System.out.println(aWeb[i]); Spider spider = new Spider(new URL(aWeb[i])); // <------ MALFORMEDURL OCCURS HERE } } } /* the constructor i am using, my problem doesnt currently exist with this*/ class Spider extends Thread { public URL web; // .... public Spider(URL w) { web = w; } }i have tried replacing aWeb with each individual address and the same error occurs
i have also tried outputting the values of aWeb to console
any help or input would be appreciated
thanks in advance
Link to comment
Share on other sites
7 answers to this question
Recommended Posts