Using ScheduledExecutorService in java 6 -


i wrote java program execute every 10 minutes using scheduledexecutorservice shown below , seemed work fine. however, of users have java 6 on machines due other programs have run , not working them. wrote program in eclipse , selected javase-1.6 jre, on computers java 6 runs once, never repeats. work on machine has java 8, unfortunately updating users java 8 not option. there way make work in java 1.6?

private static void timer() {     time = 10;     scheduledexecutorservice executor = executors.newscheduledthreadpool(1);     executor.scheduleatfixedrate(setatarunnable, 0, time, timeunit.minutes);  }  static runnable setatarunnable = new runnable () {     public void run() {         countdown();         setatalist();     } }; 


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

php - Cannot override Laravel Spark authentication with own implementation -

angular - DownloadURL return null in below code -