Ashay Batwal
Ashay Batwal

Reputation: 5613

Location of jar file inside lib directory

My java project contains many jars for different purposes. e.g. spring framework jars, log4j, hibernate, etc.

My question is where should I place these jars in the lib folder?

  1. Should I copy all these jars inside a single folder or
  2. Create a different folder inside lib folder for each component, i.e. so my lib folder will have hibernate, spring, log4j folders inside it or
  3. Create a folder structure similar to one created by Maven

Upvotes: 0

Views: 790

Answers (3)

Sai Ye Yan Naing Aye
Sai Ye Yan Naing Aye

Reputation: 6738

If you are using eclipse IDE,use "User Libraries" tag to make different libraries.But all libraries put to WEB-INF/lib is also OK.

Upvotes: 1

Chris
Chris

Reputation: 5654

What is your deployment ? (WAR/EAR) ?. In either case, all the jars files go directly under lib folder

Upvotes: 0

toy
toy

Reputation: 12141

If you don't want to use Maven, what I'd like to do is, to have each folder for each jar and create a subfolder for each version.

For example,


lib
|
---hibernate
      |+3.xx
          |+ .jar
---spring
      |+3.xx
          |+ .jar

But if you have only few jar files, you could put them all in one folder and your IDE will take care of it.

Upvotes: 0

Related Questions