can't run Beginning Algorithm examples
I'd like to buy this book, but I can't get the examples to run. I followed the instructions in the readme.html and compiled the files for chap 3 successfully. But I can't run the test.
Here is my dos output on Windows XP professional (with my jvm at C:\Program Files\Java\jdk1.5.0_07):
First I followed the book instructions and entered:
C:\BeginAlgorithms>java -classpath junit.jar:main:test junit.textui.TestRunner com.wrox.algorithms.l
ists.ArrayListTest
Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/TestRunner
Then I tried specifying the classpath like so:
C:\BeginAlgorithms>set CLASSPATH=C:\BeginAlgorithms\junit.jar;C:\BeginAlg orithms\test
And I got the following:
C:\BeginAlgorithms>java junit.textui.TestRunner com.wrox.algorithms.lists.ArrayListTest
Exception in thread "main" java.lang.NoClassDefFoundError: com/wrox/algorithms/iteration/IteratorOut
OfBoundsException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at junit.runner.StandardTestSuiteLoader.load(Standard TestSuiteLoader.java:11)
at junit.runner.BaseTestRunner.loadSuiteClass(BaseTes tRunner.java:193)
at junit.runner.BaseTestRunner.getTest(BaseTestRunner .java:86)
at junit.textui.TestRunner.start(TestRunner.java:171)
at junit.textui.TestRunner.main(TestRunner.java:138)
Any suggestions? Thanks. If you help me figure it out, I'll buy the book!
|