I don’t understand how should I know which Apache Commons jar’s to reference if I want to use some of its components.
For example, if I want to use ObservableCollection, how do I know which jar’s to reference to be able to use it.
I downloaded Collections (I added it to my build path) but this component has only “AbstractCollectionDecorator” class. In the documentation I can see that the actual class lies in the package:
org.apache.commons.events.observable.ObservableCollection
How should I figure out which package to reference?
From the package name, e.g. org.apache.commons.events remove the org.apache part.
The next part is org.apache.commons, that means it’s the Apache Jakarta Commons project group, which is also an aggregator for multiple projects. So we need yet another fragment for the name to distinguish it:
So you got org.apache.commons.events now. The name suggest commons-events, because Apache Commons Collections would be org.apache.commons.collections
So all you have to do is remove org.apache, replace the dot with a slash and you’ve got the jar filename you need:
etc