magic_turtle
magic_turtle

Reputation: 1323

In Eclipse, how to add a folder of jars under WEB-INF/lib folder?

I am currently getting an error of

.jar will not be explored or published. Runtime ClassNotFoundExceptions may result. 

The reason for that is I did not put my libraries under WEB-INF/lib folder directly. I put them in folders. Is there a way to store them rather in folders?

Structure:

WEB-INF
---lib
------folder1
---------<jars>
------folder2
---------<jars>

Those jars are not added to the classpath, even though I select them through Build Path -> Configure Build Path -> Libraries -> Add JARs...

Upvotes: 0

Views: 1543

Answers (1)

Zia
Zia

Reputation: 1011

First you can create a user library.

Go to Window => Preferences=> Java => Build Path => User Libraries. => Then choose New, and give your library a name => Then add the JARs you want.

Once the library is created at them in class path of your project.To add right-clicking on the project => Properties=>Library Tab=>Add Libraries => User Libraries, and selecting your library name.

Upvotes: 3

Related Questions