Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Getting Java (DynWeb) Build Path to work correctly (What's the difference between ext jar and jar in WEB-INF/lib ?)
Getting Java (DynWeb) Build Path to work correctly [message #647401] Thu, 06 January 2011 01:35 Go to next message
Robert_K  is currently offline Robert_K Friend
Messages: 3
Registered: January 2011
Junior Member
Regarding the build path for a Java ( Dynamic Web Project )
What's the difference between ext jar and jar in WEB-INF/lib ?

I assumed (and had previously running apps) based on a build path that included external jars. ( not in WEB-INF/lib )

After getting a ClassNotFoundException,
I moved the jar into WEB-INF/lib and included it from there, and was able to get past the error.

The issue came up while I was working on a Spring MVC tutorial app. Can someone clarify ?
Re: Getting Java (DynWeb) Build Path to work correctly [message #647402 is a reply to message #647401] Thu, 06 January 2011 01:53 Go to previous messageGo to next message
Robert_K  is currently offline Robert_K Friend
Messages: 3
Registered: January 2011
Junior Member
Another item I need clarified.
On the Java Build Path dialog - the right-most tab:
-- Order and Export --
(Exported entries are contributed to dependent projects)

please explain, what dependent projects mean.
dependent projects ?? as in mine ?

I note some markers under the category:
Classpath Dependency Validator Message
*.jar will not be exported or published

a hint and some guidance here, would be most helpful, TIA.
Re: Getting Java (DynWeb) Build Path to work correctly [message #647987 is a reply to message #647402] Mon, 10 January 2011 17:14 Go to previous message
k d is currently offline k dFriend
Messages: 1
Registered: January 2011
Junior Member
I just went through this process myself. While I may not be the best source on this, as I am still learning how to use Eclipse/Tomcat, if this is off base, I suspect the corrections will flow Smile

My application has 2 projects A and B. A has some higher level Java model classes, needing several jars. I set this up as a Java project, with a lib folder. To get proper compilation, I needed to specify the jars via the prefs|JBP|library "external jars" option, as the other options seemed inappropriate.

Project B has java and jsp classes, so I set this up as a DynamicWebProject. In the JavaBuildPath, I specified A as required. I then needed to specify project A's jars and source as exportable, so that B could use them.

I initially used this same external jars approach for project B's jars under WEB-INF/lib. However, at some point I noticed that these jars were already specified (in prefs | JBP|libraries WebApp libraries) so I removed the external jars references. So it appears that Eclipse will automatically find the WEB-INF/lib jars, at least in a DynamicWebProject.

Also these Export options seem to be for compilation only, Deploying has a separate process. When I build the .war file (File|export|web|War file), I needed to specify the prefs|DeployAssembly options: A needed src, and the jars in its lib file; B needed jsp path, and A jar
Previous Topic:i can't deploy process bpel in ode
Next Topic:Java Swing bug or error in program??
Goto Forum:
  


Current Time: Wed Apr 24 22:47:59 GMT 2024

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

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

Back to the top