Typically, Java specification classes are divided into two parts:
- The part of the API (jar) that contains mainly the interfaces usually provided by development guys.
- The implementation part (jar) that contains the implementations of these interfaces.
An example of the above is JDBC: javax.sql.* Classes are provided by sun/oracle , but implementation is done in the JDBC drivers provided by each db provider. In this case, some configuration is needed to "map" the API to its implementation, because you only use the API classes.
Your JSF example is slightly different in that both Mojarra and MyFaces contain the API classes from the javax.faces.* Package, basically there are different classes with the same names. Therefore, there is no need to configure, classes have the same name in both libraries and are loaded by the class loader whenever necessary from Mojarra or MyFaces cans, depending on what is in the class path.
source share