title: How to Run a specific Main class from a jar
body: <p>I have a jar file having 2 java classes both having Main methods. Is there a way I can specify while running the jar file, which class to call ?
  I know that manifest file can be modified to specify the Main class but since only one class can be mentioned, that does not help. 
  I checked the below links, but those dint solve the problem:</p>
  
  <p><a href="https://stackoverflow.com/questions/5474666/how-to-run-a-class-from-jar-which-is-not-the-main-class-in-its-">https://stackoverflow.com/questions/5474666/how-to-run-a-class-from-jar-which-is-not-the-main-class-in-its-manifest-file</a></p>
  
  <p>manifest-file
  <a href="https://stackoverflow.com/questions/5070100/execute-a-main-class-from-a-jar">execute a main class from a jar</a></p>
  
  <p>It gives NoClassDefFoundError.</p>