title: Run single test from a JUnit class using command-line
body: <p>I am trying to find an approach that will allow me to run a single test from a JUnit class using only command-line and java.</p>
  
  <p>I can run the whole set of tests from the class using the following:</p>
  
  <pre><code>java -cp .... org.junit.runner.JUnitCore org.package.classname
  </code></pre>
  
  <p>What I really want to do is something like this:</p>
  
  <pre><code>java -cp .... org.junit.runner.JUnitCore org.package.classname.method
  </code></pre>
  
  <p>or:</p>
  
  <pre><code>java -cp .... org.junit.runner.JUnitCore org.package.classname#method
  </code></pre>
  
  <p>I noticed that there might be ways to do this using JUnit annotations, but I would prefer to not modify the source of my test classes by hand (attempting to automate this). I did also see that Maven might have a way to do this, but if possible I would like to avoid depending on Maven.</p>
  
  <p>So I am wondering if there is any way to do this?</p>
  
  <hr>
  
  <p>Key points I'm looking for:</p>
  
  <ul>
  <li>Ability to run a single test from a JUnit test class</li>
  <li>Command Line (using JUnit)</li>
  <li>Avoid modifying the test source</li>
  <li>Avoid using additional tools</li>
  </ul>