title: Junit and Java classpath woes - OS X
body: <p>I'm trying to run the sample tests that come with junit4.7 and having some difficulty.</p>
  
  <p><code>java</code> is respecting my <code>CLASSPATH</code>:</p>
  
  <pre><code>me@dinosaurhunter ~/Desktop&gt; export CLASSPATH=
  me@dinosaurhunter ~/Desktop&gt; echo $CLASSPATH
  
  me@dinosaurhunter ~/Desktop&gt; java junit.textui.TestRunner junit.samples.AllTests
  Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/TestRunner
  me@dinosaurhunter ~/Desktop&gt; source /etc/profile 
  me@dinosaurhunter ~/Desktop&gt; echo $CLASSPATH
  :/Library/Java/Extensions/junit/:/Library/Java/Extensions/junit/junit.jar
  me@dinosaurhunter ~/Desktop&gt; java junit.textui.TestRunner junit.samples.AllTests
  Exception in thread "main" java.lang.NoClassDefFoundError: junit/framework/Test
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:164)
      at junit.runner.BaseTestRunner.loadSuiteClass(BaseTestRunner.java:207)
      at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:100)
      at junit.textui.TestRunner.start(TestRunner.java:179)
      at junit.textui.TestRunner.main(TestRunner.java:138)
  </code></pre>
  
  <p>but as you can see, it's unable to find <code>junit/framework/Test</code>... I looked in the <code>/Library/Java/Extensions/junit/junit.jar</code> and it is included, though.</p>
  
  <p><code>/Library/Java/Extensions/junit/junit.jar</code> is a symlink. Is that okay?</p>