java.lang.NoClassDefFoundError when loading a class located in another project at Eclipse

It is useful to use classes that resides in another project in the Eclipse Workspace.
In order to avoid java.lang.NoClassDefFoundError error, perform the following steps:
viewProjects1

Add the project that has the wanted classes to the Java Build Path

Properties-> java build path -> projects ->add your project that contain wanted classes
JavaBuildPathProjects
Check the added project in “order and export tab”

Deployment Assembly

Properties-> Deployment Assembly -> Add -> project -> choose your project that contain wanted classes
Assembly3
newAssembley4
All left to do is Clean project and Start.

Leave a Reply

*