wish help you to fix your issue If you have your project set up in Eclipse, then you should be able to view all the dependencies in the Project Explorer view. They must be on the build path in order for you compile things properly. On the Ant side, I would assume the necessary jars for the runtime will be copied somewhere with the rest of the build. This is especially true if your project is being built into a WAR.
Eclipse Project references vs Java EE Module Dependencies
it fixes the issue Project references set up a dependency for compilation. So if project A references project B, then a class in A will compile successfully if it references a class in B. Module dependencies (Deployment Assembly in the properties) are for Java EE modules (EARs, WARs, EJB-JARs, RARs). So if a (EAR) project includes another (non EAR) as module dependency, the other project will be included in the deployment, as dictated by Java EE specs for the type of the included project.
How to package dependencies into java project with eclipse
wish help you to fix your issue The best solution to avoid such problems is creating maven based project by eclipse. when you export your project as jar or war files it puts all dependencies in the jar or war files
I hope this helps . I faced similar issue. But I figured out that my problem was with maven dependencies but not with the external jar. In my case, I did not create the main project (i.e. your Y) as a Maven project which was why it wasn't working. Moment I converted it (Y) to Maven project, my code started working like magic.
transitive dependencies in Eclipse Plugin-Project with Java 9
seems to work fine You can modify the MANIFEST.MF in project B to reexport its dependency to project C: open the MANIFEST.MF from project B in the MANIFEST-Editor switch to the Dependencies tab select the dependency to project C and click "Properties..." select "Reexport this dependency"