title: It's possible to run multiple java packages each package has a main class
body: <p>I have many packages that have classes  in an eclipse project under src package  each package has a main class  each   class like this  </p>
  
  <pre><code>public class A extends TimerTask {
  public A()
  {
  }
  @Override
  public void run() {
  
      new A();    } }
  </code></pre>
  
  <p>and each other class like this </p>
  
  <pre><code>public class MainClass 
  {
  public static void main(String[] args) throws InterruptedException  {   
   java.util.Timer timer = new java.util.Timer();
  timer.schedule( new A(), 0, 1000);;
  timer.schedule( new B(),0,1000);
  }
    }
  </code></pre>
  
  <p>But I fail to execute two packages as the same time.
  Could someone suggest?</p>