Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / March 2004

Tip: Looking for answers? Try searching our database.

Eclipse classpath question

Thread view: 
doodles - 08 Mar 2004 14:05 GMT
In ant, there is a way to set a classpath that includes all .jar files
underneath a particular directory, like this:

- <path id="classpath">
     <fileset dir="c:\Programming\Java\jwsdp-1.1"
includes="**/*.jar" />
     <dirset dir="c:\Courses\SOAP"
includes="c:\Courses\SOAP" />
</path>

Is there a way to do this with Eclipse?  It is inconvenient to individually
specify all the various .jar files that have to be included when doing Web
Services.  Thanks
Davor Cengija - 08 Mar 2004 14:51 GMT
> In ant, there is a way to set a classpath that includes all .jar files
> underneath a particular directory, like this:

> Is there a way to do this with Eclipse?  It is inconvenient to
> individually specify all the various .jar files that have to be
> included when doing Web Services.  Thanks

I'm affraid not, but I'd like to hear what other people have to say.

In WSAD (IBM's Eclipse on steroids) you can create a web application and
then put jars in WEB-INF/lib dir which is automatically created. It works
just as expected: all jar files are automatically in the project's
classpath.

Signature

Davor Cengija, dcengija_IQ_Filter_@inet.hr

Joe Fischer - 09 Mar 2004 01:33 GMT
>> In ant, there is a way to set a classpath that includes all .jar files
>> underneath a particular directory, like this:
[quoted text clipped - 9 lines]
>just as expected: all jar files are automatically in the project's
>classpath.
    If you set up the file structure for a project before creating
the project with eclipse it will import the source and all the jars
that it finds.
    With the way I usually set up eclipse projects, for example,
I'll have the project as a root folder with sub-folders for src, lib,
doc, classes (or bin), etc.  Put all your files in place then create
the project with eclipse using the project base folder as the project
location for eclipse.  Even if you don't have any (or many) source
files, eclipse should pick up the jars under lib (not sure if it will
find zip files).
-------
Remove underscores from e-mail address.
doodles - 09 Mar 2004 15:48 GMT
I am not sure I understand your strategy, so let me take a stab at it:

If I set up a file structure prior to creating the eclipse project, it will
automatically find all .jar files located under the root directory of the
project.  This will require me to copy all the .jar files that are located
under the various subdirectories of the Java Web Services Developer Pack
directory.  However, if I create my project within the JWSDP directory
(using "src" or something) then it should find all the .jar files underneath
it.

Did I get that right?

> >> In ant, there is a way to set a classpath that includes all .jar files
> >> underneath a particular directory, like this:
[quoted text clipped - 21 lines]
> -------
> Remove underscores from e-mail address.
Joe Fischer - 09 Mar 2004 23:55 GMT
>I am not sure I understand your strategy, so let me take a stab at it:
>
[quoted text clipped - 33 lines]
>> -------
>> Remove underscores from e-mail address.

    Yes, I guess that I'm saying that eclipse thinks that nothing
exists outside of the project directory.  If your jars are scattered
around other parts of the file system then eclipse would not find them
on its own.
    But if you have a bunch of jars in one subdirectory you can
select more than one on the project library wizard.  I guess that is
an extra manual step that you are trying to avoid.
    The .classpath file that eclipse creates is simple enough that
a Perl script or something should be able to create one.  You could
probably even create it using ant.
-------
Remove underscores from e-mail address.
Jon A. Cruz - 08 Mar 2004 19:01 GMT
> Is there a way to do this with Eclipse?  It is inconvenient to individually
> specify all the various .jar files that have to be included when doing Web
> Services.  Thanks

I'm not sure with webservices (and I know the **/* works for exclusion
filters), but for similar usage I've just setup a single Eclipse project
to "own" the jar files. Just import and export them, then other projects
can use them by checking that holder project.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.