I have 2 java projects ProjectA (java web app) and ProjectB (contains other java classes) in my eclipse IDE. e.g.
ProjectA ProjectB
|_HelloWorld.java |_PrintHelloWorld.java
|_HelloWorld( |_print()
new PrintHelloWorld().print()
)
So ProjectA has a class with a method that is calling a method from a class in ProjectB. In Order to get these projects to build, I have built ProjectB and added the jar as a dependency on ProjectA's build-path. So I don't get any compilation errors and the project seems to build fine.
However, when I debug through the code. I get ClassNotFoundException
at the line where ProjectA calls the method in project B
Does anybody know what I am doing wrong/have missed out?