WSAD > Server Configuration > Paths > Class Path > Add External JARs
Main Topics
Browse All TopicsHI Guru,
I am stuck here so someone might really help me.
I have an .ear file which has the following
(a) .war file.
(b) .jar file. (Project Utility Jar's)
(c) .jar files (Utility Jar's )
I have more than one projects so we have to have many .ear files.
Now here is the problem.
With each .ear we keep all the Utility Jar files under the .ear eg. commons-beanutil.jar,commo
Now the same .jar are replaced across all .ear file since they are contained in the .ear file.
Thus if we upgrade a version it is a headache since other projects want to get the newer version. - and the newer version is only local to this .ear file.
It is getting ugly since the applications (.ears) are increasing ...
If anyone can figure out a way where we can have a common repository all the Utitly Jar files which can used across all the .ear files it will be great ....
Thanx a lot,
RK
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I don't recommend using "Add External JARs" because it may cause classloader issues down the road. It can also conflict with the server's jar files.
Better, and more standard approach:
For WAS 4.x, pub your jars in <appserver home>/lib/app directory. Do the same in your WSAD environment. The path is a little different: <WSAD home>plugins\com.ibm.etool
Then in your web and EJB projects, right click the project, do "java build path", then on the "libraries" tab, click "add variable". There will be a variable like WAS_PLUGINDIR (depends on version) ... pick that and click extend to add /lib/app/jarname.jar to the path.
You don't have to change the runtime classpath cuz it's automatically picked up.
For WAS 5.x and 6.x, you have to add a shared library on the server. The /lib/app is no longer supported there. Go to AdminConsole, expand "Environment" node, then click on "shared libraries". Point to a path for your jars. Actually it can be any path, but since it's a shared library it can be pointed to from any of your apps AND you can change the location of the jars just by changing the ONE shared library entry. In WTE (in WSAD), the easiest way to do the same thing is open your server config, check "enable admin console" on the second tab, save and restart your server, then right click on your server node and choose "run admin console". This will give you the exact same console as used for the full WAS. Do everything the same way.
Finally, for 5.x and 6.x, in you WSAD project follow the same instructions as for WSAD 4 above.
HTH!
it's not hectic ... I just gave you detailed instructions. Once you do it once, you just have to update the jars once each time they change.
Regarding keeping the jars in CVS ... well, you would still keep them there, but they're not automatically going to get updated to your server. You have to choose your poison here. Either have the flexibility but extra work of keeping each EAR with its own copy of the jars, or have less hassle but less flexibility with keeping all the jars in one place.
These are the two ways to do it.
Business Accounts
Answer for Membership
by: boonlengPosted on 2005-05-19 at 18:54:49ID: 14042475
You can place the utility jar files in a directory, then add the file location to the server instance classpath.
So when server startup, it will load the jar files specified in the classpath.