I have two projects: project A and project B. Project B is a web service deployed in a Tomcat 9 server. I want to use project A in project B, therefore I exported project A as a jar and imported it in project B. To do that I created a libs folder in the root path of project B, selected the jar and added it as a library.
When using the imported project's classes I am getting no compilation errors; when launching the server neither. But at runtime I am getting NoClassDefFoundError exceptions when using project A's classes in project B.
To be honest I have never run into this kind of situations, but this is the first time I am importing a project of my own into another project of my own so I am not used to this.
How can I add my imported jar into the runtime classpath? I have been looking for information for quite a while but I couldn't find any help. I tried all this and it did not work.