title: Eclipse's not Run As does not show Java Application
body: <p>I am using Eclipse IDE for Java Developers - 2021-12. The code I am working on here works fine on every other code editor, but I cannot run it on this one. I had tried other ways to fix this but it has not worked so far.<br />
  <a href="https://i.stack.imgur.com/jQrtq.png" rel="nofollow noreferrer">image of the problem</a><br />
  <a href="https://i.stack.imgur.com/Yv3vq.png" rel="nofollow noreferrer">the ant debug error</a></p>
  <pre><code>import java.time.LocalDateTime;
  import java.time.ZoneId;
  import java.time.format.DateTimeFormatter;
  import java.awt.*;
  import javax.swing.*;
  import java.awt.event.*;
  import java.time.ZoneId;
  import javax.swing.Timer;
  
  public class Main {
    public static String GetTime(){
      ZoneId zoneid = ZoneId.of(&quot;Asia/Ho_Chi_Minh&quot;);
  
      DateTimeFormatter format = DateTimeFormatter.ofPattern(&quot;dd/MM/yyyy; HH:mm:ss&quot;);
      LocalDateTime localtime = LocalDateTime.now(zoneid);
      String time = localtime.format(format);
      return time;
    }
    public static void WindowOpen(){
      JFrame frame = new JFrame(&quot;Time&quot;);
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      JLabel label = new JLabel(GetTime(),SwingConstants.CENTER);
      label.setPreferredSize(new Dimension(300,100));
      frame.getContentPane().add(label,BorderLayout.CENTER);
      frame.getContentPane().setBackground(Color.decode(&quot;#f88379&quot;));
      frame.setLocationRelativeTo(null);
      frame.pack();
      frame.setVisible(true);
  
      Timer timer = new Timer(1000,new ActionListener(){
        public void actionPerformed(ActionEvent a){
          label.setText(GetTime());
        }
      }
      );
      timer.start();
    }
    public static void main(String[] args){
      WindowOpen();
    }
  }
  </code></pre>