title: How to create an artifact jar using the command line only?
body: <p>I have a java project and using IntelliJ in project settings I've created an Artifact JAR.  My project is of the form:</p>
  <ul>
  <li>lib/MyInterface.jar</li>
  <li>src/com/test/MyTest.java (does not contain a main method)</li>
  </ul>
  <p>Where MyTest.java references MyInterface.jar.</p>
  <p>When I run [Build -&gt; Build Artifacts -&gt; MyTest.jar -&gt; Build] IntelliJ creates a jar that simply contains MyInterface.class and MyTest.class.  I'm using this JAR as a library in another project.</p>
  <p>What I need is to be able to create this JAR without having to use IntelliJ or Maven or anything other than javac and jar (due to constraints on the machine this code will be deployed to).  Is this possible and if so how can I go about doing this using the command line only?</p>