Common class accessibility

Here at work, we have a bunch of common classes. They're all in the com.whatever package. Each application has it's own copy of com.whatever in it's jar file. Obviously, this is a problem. At least it's getting to be. I'd like to find a way to make all of the applications get the package from the same place. Idealy, I'd like to change as little code as possible. I guess that's a given though. Anyway, I'd like to know what you guys suggest.

-Dave

[477 byte] By [davidTheGiant] at [2007-9-30 2:40:33]
# 1
You could put the package in the "extenstions" directory {$JAVA_HOME}/jre/lib/ext.
malcolmmc at 2007-6-29 8:24:48 > top of Java-index,Archived Forums,Java Programming...
# 2
That still leaves me to update every box that's using it.
davidTheGiant at 2007-6-29 8:24:48 > top of Java-index,Archived Forums,Java Programming...
# 3

> Here at work, we have a bunch of common classes.

> They're all in the com.whatever package. Each

> application has it's own copy of com.whatever in it's

> jar file. Obviously, this is a problem.

Why is that a problem?

When you QA do you QA the common classes or the application?

Do you want to QA every application every time you change anything in the common classes? If not then you must distribute the version of the common classes for which the applicationwas tested.

jschell at 2007-6-29 8:24:48 > top of Java-index,Archived Forums,Java Programming...
# 4
> That still leaves me to update every box that's using> it.Are you worried you'll forget to update one, or what is your motivation for solving this problem?
nasch_ at 2007-6-29 8:24:48 > top of Java-index,Archived Forums,Java Programming...
# 5

Are you saying that you put the com.whatever.* classes into several different jar files and later you need to re-build all those jar files when a common class changes?

Maybe I misunderstand, but if this is your problem then why don't you just create a common.jar file and put the com.whatever.* classes there?

Maybe you have a different problem, though, in that you don't want to have to re-copy that common.jar file to several different places every time it's modified. If that is your concern then I suppose you could just put the jar on a network file path and add it to the class path for each application.

There are other techniques you can use for updating the client's copy of a jar file when necessary if you need to avoid the cost of loading the jar over the network.

stokes_david at 2007-6-29 8:24:48 > top of Java-index,Archived Forums,Java Programming...
# 6

> Are you saying that you put the com.whatever.* classes

> into several different jar files and later you need to

> re-build all those jar files when a common class

> changes?

> Maybe I misunderstand, but if this is your problem

> then why don't you just create a common.jar file and

> put the com.whatever.* classes there?

> Maybe you have a different problem, though, in that

> you don't want to have to re-copy that common.jar file

> to several different places every time it's modified.

> If that is your concern then I suppose you could just

> put the jar on a network file path and add it to the

> class path for each application.

> There are other techniques you can use for updating

> the client's copy of a jar file when necessary if you

> need to avoid the cost of loading the jar over the

> network.

This is pretty much what I was getting at. Something I should have thought of before. Neat. I guess I just needed a kick in the right direction. I'm going to take this and see what I can do with it.

Thanks,

Dave

davidTheGiant at 2007-6-29 8:24:48 > top of Java-index,Archived Forums,Java Programming...