Importing external jars [message #179572] |
Thu, 21 September 2006 14:42  |
Eclipse User |
|
|
|
Originally posted by: aaron.esitenow.com
I don't quite understand how Eclipse imports external jars to the build
path. I have imported the jars, they show up in libraries in project
explorer, but it doesn't actually put the jars in web-inf/lib. Even
though I'm not getting any compile errors, Tomcat complains that it
can't find the classes. Do I need to manually import the libraries
myself for each library?
|
|
|
|
|
|
|
Re: Importing external jars [message #181072 is a reply to message #180648] |
Fri, 06 October 2006 15:20  |
Eclipse User |
|
|
|
Ah, the J2EE Module Dependencies setup is what I have been looking for!
Strange that I have missed it..
I don't have to create a new project or use any absolute paths (or setup
any variables). I just link my common jars directory in Subversion into
the project using an svn:externals property and then I can add the jar
files from that linked directory. (That, as far as Eclipse is concerned,
is part of the project)
Thanks!
/Niklas
Konstantin Komissarchik skrev:
> Niklas,
>
> Here is one of the better ways to do this:
>
> 1. Create a generic project (General->Project).
> 2. Copy your jars into this project and source control the project.
> 3. Whenever a web app needs to reference one of these jars, go to that
> web app's project properties and use the "Add JARs" button on the J2EE
> Module Dependencies page.
>
> The jars will be automatically added to your web project's classpath and
> now WTP will also know to package them into your WAR's WEB-INF/lib
> directory when you export it.
>
> If you don't want to create a project around your jars, then you can use
> the "Add External JARs" (puts absolute paths into your project metadata)
> or "Add Variable" (requires that the classpath variable that you use is
> configured in every team member's workspace).
>
> - Konstantin
|
|
|
Powered by
FUDForum. Page generated in 0.04094 seconds