I want to change an application by changing a component. In Java, it would seem that the swappable object could be placed in a jar. One version of the jar could be deleted and another identically named jar would be put in its place.
Is this the best practice for swappable Java components, and if not, then what?
Edit: to be clear, the mooted organization is to have a jar with the constant objects, and a separate jar with the swappable object. Runtime swappability is neither expected nor sought. Remote installation and runtime swapping is probably more sophisticated than necessary for my needs.
You should really look at Dependency Injection for this kind of use case(either Spring or CDI).
Also you could consider OSGi