I'm building a very simple JAX-RS RESTful dynamic web project in eclipse for the purpose of studying.
Using eclipse Oxygen.2 4.7.2, jersey 2.26, Jackson 2.9.0 Apache Tomcat 9.0.4 and Apache Derby 10.14.1.0 Database (for client/server mode).
I've followed multiple tutorials and documentation on the matter.
Converting the project to maven and adding the derby database works.
Leaving the project un-mavenned and adding the derby database relevant jars into the /WebContent/WEB-INF/lib/ directory also works.
However, adding these same jars as a user library in the project's java build path does not work and ends up with the exception mentioned in the title when a call is made to the JDBC driver.
Class.forName("org.apache.derby.jdbc.ClientDriver")
I need help to understand what I'm missing. To reiterate my question: Why does adding the derby jars as build path libraries not work but adding them to lib folder worked? I apologize if this sounds like a silly question but I'm new to the subject. Adding jersey and jackson as libraries in the build path did work. Is derby different or should it work and I did something wrong?