run()
package untitled31234;
import java.lang.*;
import java.net.URL;
class NewThread extends Thread{
Thread t;
String name;
String urlFile;
String nameFile;
NewThread(ThreadGroup gr, String nametread, String urlFile, String nameFile){
super("asdf");
this.urlFile = urlFile;
this.nameFile = nameFile;
start();
}
public void run(){
try
{
HttpDownloader HDwler=new HttpDownloader();
HDwler.urlDownload(new URL(urlFile),nameFile);
}
catch (Exception e)
{
System.out.println("Download aborted");
}
}
}
public class Jadro{
public Jadro() {
ThreadGroup gr = new ThreadGroup("grouploadfile");
new NewThread(gr, "1.avi", "http://172.17.0.43/qwe.qw", "1.avi");//начало скачивания
new NewThread(gr, "2.avi", "http://172.17.0.43/asd.qw", "2.avi");
}
}