title: Error: Could not find or load main class in Java Maven project
body: <p>I am working in Java Maven project. There is a <code>.bat</code> file in the root of the project which invokes a Java class with some arguments something like this:</p>
  <pre><code>java my.package.MyClass abc hi 1
  </code></pre>
  <p>Now, my project jar is built in the target directory of that project when I do <code>mvn clean install</code>. When I run that <code>.bat</code> file it gives me the below error</p>
  <pre><code>Error: Could not find or load main class my.package.MyClass
  </code></pre>
  <p>Project's <code>pom.xml</code> only contains jars as dependency.</p>
  <p>Do I need to do something in <code>pom.xml</code> to make it work?</p>