Referencing external libraries in Vaadin app

Hello,

I need to use EqualsBuilder and HashCodeBuilder for my application, and so I need to reference an external library. I’ve already added my .jar file to Properties/Java Build Path/Libraries. However, when I try to run the project, I get a “NoClassDefFoundError” (even after cleaning the project).

I’ve done some googling, and I came across this six-year-old thread:
https://vaadin.com/forum#!/thread/720632

According to that thread, I also need to place my external library under Java Resources / Libraries / Web App Libraries. The thing is, I don’t seem to have a “Web App Libraries”. Under Java Resources / Libraries I only have “JRE System Library”, “Maven Dependencies”, and “Referenced Libraries” (which already has my external library inside). That thread, and others that I’ve come across while Googling, also reference a “WebContent/WEB-INF/lib” folder, which I also cannot find anywhere. Is this information out of date? If so, how do I use my external library?

Thank you,
Will

Hi Will,
is are you working on a maven project? If so you should just add the dependencies to the pom.xml.

HTH
Marco

Hi Marco,

Thanks for the help! For future confused people who stumble across this, I added commons-lang3 to pom.xml dependencies using these instructions:
https://mvnrepository.com/artifact/org.apache.commons/commons-lang3/3.0

And it worked great. Thanks again!