Project A depends on project B.
On compilation time , everything is OK.
On debug , when a static function from class bClass of project B is called , I get NoClassDefFoundError .
On run , I get ExceptionInInitializerError.
Besides , the bClass has a static initializer , and when I put a break point there , it never reaches it – which seems very strange to me , but also makes sense because the class is probably not found.
Any idea how to fix? I’ve checked all dependencies to the best of my understanding.
In the case of NoClassDefFound exceptions, double check your runtime classpath against your compiletime classpath. Eclipse usually uses the compile-time classpath for the runtime CP but if you have modified the default launch config, they may not match anymore.