Adding 3rd party jars to WEB-INF/lib automatically using Eclipse/Tomcat
buildpath, eclipse, jar, java, tomcat
Solution
Here are the instructions for Helios. For earlier releases, see SeanA's answer.
- Project Properties -> Deployment Assembly
- Add -> Java Build Path Entries
- You should now see the list of libraries on your build path that you can specify for inclusion into your finished WAR.
- Select the ones you want and hit Finish.
Problem
I have a dynamic-web project set up on Eclipse and I'm using Tomcat 7 as my web server. It doesn't seem to be automatically putting 3rd party JARs I add to my library on my build path into the WEB-INF/lib folder. Is there a way I can do this automatically? Every time I search for an answer to this, I find something like this. So how do I do that automatically? Is there a way to configure my build path to do this?
Related problems
- How to add JAR libraries to WAR project without facing java.lang.ClassNotFoundException? Classpath vs Build Path vs /WEB-INF/lib
- Including java libraries to Tomcat inside Eclipse
- How to add JAR libraries to WAR project without facing java.lang.ClassNotFoundException? Classpath vs Build Path vs /WEB-INF/lib