john miran
john miran

Reputation: 393

eclipse creating user library using variable to specify jars path

Is there a way to create user library in eclipse using class path variable to add relative path jars to the library

Upvotes: 6

Views: 3364

Answers (2)

Ebeneezer
Ebeneezer

Reputation: 89

The approach suggested by GGrec is functional and I used it. But "User Libraries" allow some sort of grouping/structuring, for example "Jersey", or "Hibernate", etc. I found an alternative way to get it working: Created the simplest Eclipse Project. Then inside it created "Linked Resource" Folder using an Eclipse Path Variable. Now I can create the necessary "User Libraries" and "Add JARs" to them, using this Linked resource folder. In case the location of the jars is changed, the only thing that should be altered is the Eclipse Path Variable, pointing to them. May be this approach can help someone else.

Upvotes: 0

Georgian
Georgian

Reputation: 8960

It's easy. Don't use User Libraries. Instead, use Variables. Example from my workspace:

Open image in a new tab to see full size

Open image in a new tab to see full size

Further reference: Here and there

Upvotes: 2

Related Questions