I'm trying to run the sample tests that come with junit4.7 and having some difficulty.
java
is respecting my CLASSPATH
:
me@dinosaurhunter ~/Desktop> export CLASSPATH=
me@dinosaurhunter ~/Desktop> echo $CLASSPATH
me@dinosaurhunter ~/Desktop> java junit.textui.TestRunner junit.samples.AllTests
Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/TestRunner
me@dinosaurhunter ~/Desktop> source /etc/profile
me@dinosaurhunter ~/Desktop> echo $CLASSPATH
:/Library/Java/Extensions/junit/:/Library/Java/Extensions/junit/junit.jar
me@dinosaurhunter ~/Desktop> 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)
but as you can see, it's unable to find junit/framework/Test
... I looked in the /Library/Java/Extensions/junit/junit.jar
and it is included, though.
/Library/Java/Extensions/junit/junit.jar
is a symlink. Is that okay?