同一个Thread不能重复调用start方法
要 implements Runnable,通过使用匿名对象:如new Thread(new MyThread())).start()。可多次调用。
public class test {
public static void main(String[] args) {
SendEmail sendEmail = new SendEmail();
//设置多个收件人
sendEmail.recipient1 ="470070654@qq.com ,cxmfly@163.com";
// sendEmail.start();
new Thread(sendEmail).start();
}
}
参考:https://dandelioncloud.cn/article/details/1546367689700802561