I have two projects ,
i) java se that implements database connectivity and other database related manipulation ,
ii) java web project (I am learning servlet programming),which has a servlet class that asks for an employee id and prints employee details.
Second project uses classes from 1st project.
I have exported first project as .jar and imported it in second project. However , I am getting NoClassDefFound error while calling classes from 1st project.
How to resolve it ?
I have two projects , i) java se that implements database connectivity and other
Share
Did you add the your application1.jar file to the class path of the web application? If your second application is deployed as a .war file you can place your application1.jar file in applicatin2.war/WEB-INF/lib.