title: Thread in java is not working
body: <p>previous the same thread was running in java eclipse luna, but interruptions appeared I changed to Java EE IDE, the same thread which previous ran in luna now is not running in Java EE IDE, here it is</p>
  
  <pre><code>public void clockTime(){
          Thread clock=new Thread(){
              public void run(){
                  try {
                      for(;;){
                          Calendar cald=new GregorianCalendar();
                           day=cald.get(Calendar.DAY_OF_MONTH);
                           month=cald.get(Calendar.MONTH);
                          year=cald.get(Calendar.YEAR);
  
  
                           seconds=cald.get(Calendar.SECOND);
                           minutes=cald.get(Calendar.MINUTE);
                           hours=cald.get(Calendar.HOUR);
                           lblClock.setText("&lt;html&gt;"+hours+":"+minutes+":"+seconds+"&lt;br&gt;"+day+"/"+month+"/"+year+"&lt;/html&gt;");
                      sleep(1000);
                      }
                  } catch (InterruptedException e) {
                      // TODO Auto-generated catch block
                      e.printStackTrace();
                  }
              }
          };
          clock.start();
  
          }   
  </code></pre>
  
  <p>please may any one help me??.
  calling the method to constructor I have already done not seen here, but if I remove the thread the method is executed since it displays the time and date as required but not changing due to absence of loop and forever loop.</p>