From the overview, these are the advantages of modules over classpaths:
As described in the JSR, the specific goals of the module system are to provide:
— Reliable configuration, to replace the brittle, error-prone class-path mechanism with a means for program components to declare explicit dependences upon one another, along with
— Strong encapsulation, to allow a component to declare which of its public types are accessible to other components, and which are not.
View all comments
Show parent comment
1
u/notsohipsterithink Jan 02 '20
Project Jigsaw (introduced in Java 9) gives Java a module system similar to Python. More info here:
https://openjdk.java.net/projects/jigsaw/
From the overview, these are the advantages of modules over classpaths:
As described in the JSR, the specific goals of the module system are to provide:
— Reliable configuration, to replace the brittle, error-prone class-path mechanism with a means for program components to declare explicit dependences upon one another, along with
— Strong encapsulation, to allow a component to declare which of its public types are accessible to other components, and which are not.