Before Java 9, classpath JAR resolution was fragile: missing classes only threw NoClassDefFoundError at runtime, duplicate packages conflicted silently ('JAR hell'), and any code could reflectively inspect internal packages. JPMS fixes both configuration and encapsulation above packages.
More lessons in Complete Core Java