This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Sharing External Jar files between projects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Sharing External Jar files between projects" Watch "Sharing External Jar files between projects" New topic
Author

Sharing External Jar files between projects

Mainak Goswami
Ranch Hand

Joined: May 21, 2006
Posts: 50

Hi,

I am trying to explore options to reduce my disk space during development and reuse the referencing of the external jar files from a common location.
I am using Eclipse and Weblogic application server and trying to deploy a small dynamic web application. I have created a 3rdParty project folder with a lib folder which will contain all the necessary jar files.
Question: Is there a possibility to refer my Web Application jar files to the 3rd Party project folder during development and deployment?
Applications Used:
Eclipse
Weblogic 11g running on Windows


Structure:
Project1:
3rdParty
|- lib
|- Struts-Core2.jar
|- xwork-core.jar etc....

Project2:
MyWebApp
|-src
|- Webcontent
|- jsp
|- WEB-INF
|- lib ( No Jars included)

In eclipse I have tried to reference the project1 jar files to Project2 WEB-INF/lib files by using Deployment Assembly -> Project1(Source) ->WEB-INF/lib(Deploy Path in project2). However I am not sure if this is the correct way of doing. I am still getting some errors in my jsp file as it is unable to find struts-core2.jar which is present in the Project1 folder.
Can you please help?
Thanks in advance.


------------------------------------
Mainak
idiotechie
------------------------------------
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Mainak Goswami wrote:I am trying to explore options to reduce my disk space during development.


Why? That seems like it's going to waste a lot of your time (you already presented the evidence that it's doing that) for no reason. Surely you aren't about to run out of disk space on your development machine?
Mainak Goswami
Ranch Hand

Joined: May 21, 2006
Posts: 50

I know it is not common practice to use a different lib reference other than WEB-INF\lib. But I guess definitely there is an option. I am doing it because if I use multiple projects then I can use the 3rdPartJar Projects lib folder for all future projects. In that way I can reuse the stuffs rather than using disk space unnecessarily.
Any help would be appreciated for this option.
Thanks,
Mainak
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sharing External Jar files between projects
 
Similar Threads
Change the location of persistence.xml in JPA (Eclipselink 2.3)
urgent
Access Project Utility Jar which is outside of WebContent\WEB-INF\lib from web proj packaged as EAR
problem with jar file
Why do we need to set the buildpath of the jar files