Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » specify transitive dependency in eclipse?(how to do i avoid configuation duplication?)
icon5.gif  specify transitive dependency in eclipse? [message #741370] Wed, 19 October 2011 13:18 Go to next message
elhanan Maayan is currently offline elhanan MaayanFriend
Messages: 131
Registered: November 2009
Senior Member
hi..

let's say i have a web project which depends on a java project which depends on a jar in it's class path.

if i try to use a class from java project that uses the jar, i will get a ClassNotFoundsException, is there anyway to have eclipse include that jar in the web class path? without actually inserting in the lib folder? i've tried everything, including specify order and export and use deployment assembly..

the only thing i can think of is include the jar in the server class path launcher..(which does work).
Re: specify transitive dependency in eclipse? [message #741393 is a reply to message #741370] Wed, 19 October 2011 13:37 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 19-Oct-11 07:18, elhanan wrote:
> hi..
>
> let's say i have a web project which depends on a java project which
> depends on a jar in it's class path.
>
> if i try to use a class from java project that uses the jar, i will get
> a ClassNotFoundsException, is there anyway to have eclipse include that
> jar in the web class path? without actually inserting in the lib folder?
> i've tried everything, including specify order and export and use
> deployment assembly..
> the only thing i can think of is include the jar in the server class
> path launcher..(which does work).

You should be able to consume that other project as a Web App Library.
Do this:

1) Right-click your (Dynamic Web) project.
2) Choose Build Path -> Configure Build Path...
3) Click the Libraries tab.
4) Click Add Library...
5) Select Web App Libraries and click Next.
6) Select the project whose libraries (JARs) you wish to consume.

It should be obvious from there.

Hope this answers your question.
Previous Topic:Re: Easy SOAP client code in java?
Next Topic:Can't run tomcat 7 on eclipse helios 3.6
Goto Forum:
  


Current Time: Fri Apr 26 17:17:13 GMT 2024

Powered by FUDForum. Page generated in 0.03255 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top