Classpath

Prior to Java 9, the classpath was problematic and the source of developer anguish. This was evident in the numerous developer forums and, fortunately, Oracle was paying attention. Here are the several instances in which the classpath can be problematic; here are two primary cases:

  • The first case involves having two or more versions of a library on your development computer. The way this was previously handled by the Java system was inconsistent. Which library was used during the class loading process was not easily discernible. This resulted in an undesired lack of specificity—not enough details regarding which library was loaded. 
  • The second case is in exercising the most advanced features of the class loader. Often times, this type of class loader usage resulted in the most errors and bugs. These were not always easy to detect and resulted in a lot of extra work for developers.

Classpaths, before Java 9, were almost always very lengthy. Oracle, in a recent presentation, shared a classpath that contained 110 JAR files. This type of unwieldy classpath makes it difficult to detect conflicts or even determine if anything is missing and if so, what might be missing. The re-envisioning of the Java platform as a modular system made these classpath issues a thing of the past.

Modules solve the pre-Java 9 classpath problem by providing reliable configuration.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset