用以下run
代码包装代码try catch
只是一个猜测:正在引发异常。一个
ScheduledExecutorService暂停默默地如果遇到异常。
该
run方法的代码应始终被try-catch包围,以处理和吸收所有抛出的Exception。
@Override public void run() { try { // Let no Exception reach the ScheduledExecutorService. Date date = new Date(System.currentTimeMillis()); System.out.println("Running scheduled update check " + date.toString()); updateSubscriberService.checkForUpdates(); } catch ( Exception e ) { System.out.println( "ERROR - unexpected exception" ); }}存根run
方法
采取婴儿的步骤。从一个只做一个
run事情的方法开始
System.out.println。



