aspose file tools*
The moose likes Websphere and the fly likes Adding lib jar files for a project in WSAD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Adding lib jar files for a project in WSAD" Watch "Adding lib jar files for a project in WSAD" New topic
Author

Adding lib jar files for a project in WSAD

John King
Ranch Hand

Joined: Aug 27, 2002
Posts: 165
I can add a new lib jar file in the .classpath xml file manually.
Is there a way to do it through GUI in WSAD?
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Bring up the "properties" menu for the project (context menu -- left mouse button) and look on the "libraries" tab.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Hartmut Ludwig
Ranch Hand

Joined: Aug 31, 2002
Posts: 51
Hi, Kyle,
I have a related question. I am new to WSAD and wonder how it would be possible to incorporate the externally linked jarfiles from this lib-tab into the actual EAR-File.
Everytime I construct the ear it only contains the code I have written, but not the necessary files from the external jars. If i deploy it it won't work - only if I put the linked jars into the classpath of the webapp. But this is not the propper solution, is it?
In more general terms: We have some base classes which will be used by the ejb as well as the client application or some servlets (in the webapp). I would like to export those files only once as a separate jar instead of incorporating it into the ejb and the clientapp.
Can you tell me how this is done?
TNX in advance...
Hartmut
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Hartmut,
In VERY general terms, what you want can't be done if you want to only have the files in one place and then have them used by many EARs. That goes against the J2EE spec, which insists that EARs be self-contained.
However, if you just want to include utility Java code in one or several EARs generated by WSAD, this is easy. This article by Tim Deboer provides a tool that makes that possible.
Kyle
Hartmut Ludwig
Ranch Hand

Joined: Aug 31, 2002
Posts: 51
Thanks a lot, Kyle, for your quick reply which was very helpful for me. I did not test it so far, but I guess I got it now.
BTW I did not want to share the utility-classes between different EARs, but between different components of one EAR. And since we permanently develop the utility classes as well as the EAR components, the article of Tim deBoer seems to provide a good solution for us.
Thanx again. Great to have you here on the ranch...
Hartmut
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Adding lib jar files for a project in WSAD