The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Denethon (1) [Avatar] Offline

I just purchased your book and downloaded the source code for the chapters.

I've imported the code examples into my eclipse workspace as described in appendix C and D, but for some reason theres a red cross indicating an error on each project in my package explorer. I've tried expanding every item in the folder/file structure to find the source of error, but there's no indication on whats wrong.

When trying to run the JUnit test by selecting the project and clicking "Runs as" "JUnit Test" i get a eclipse dialog saying "Errors exist in required project(s)".

If i click "Proceed" it starts running but goes soon to a halt with a exception for each test in the test suite:

Class not found com.manning.junitbook.ch03.mastering.TestDefaultController
java.lang.ClassNotFoundException: com.manning.junitbook.ch03.mastering.TestDefaultController
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
Class not found com.manning.junitbook.ch03.mastering.HamcrestTest

Any idea how to fix this? I'm happy for any help in the right direction, since I'm quite new both in java and in JUnit.

Thank you!

Message was edited by:
Meng (2) [Avatar] Offline
Re: Problem building code examples in eclipse
I meet same issues.
If you know how to resolve it, please let us know.