To share libraries across a specific cluster instead of the entire domain, copy the JAR files to the domain-dir/config/cluster-config-name/lib directory. Then add the path to the JAR files to the System class loader as explained in Using the System Classloader.