title: Cannot run as java application in Eclipse, even have correct main() class
body: <p>I get confusing with Eclipse, when I import a project from Git, then I click on a java file, which has correct main function  like: </p>
  
  <pre><code>  public static void main(String[] args) throws Exception { }
  </code></pre>
  
  <p>and the outside class has same name with java file. But when I right click the java file, only have "run on server" or "run configuration" option, no "run as java application" like normally. Even if I copy a java file which I can run as java application from different project to this project (no error) then it do not have this option ??? I am quite sure it is nothing to do with the code. I checked the code, totally the same and should be able to run.(I am aware of similar questions on the website but I checked and my problem is not there)</p>
  
  <p>So is there any extra steps I need to do with this project (like maven build ? -> I tried this but also can't run, how to run it properly ?) to have this option again ???</p>
  
  <p>Really confusing !</p>