26.7.10

Using Libraries

  • Library Wrapper Module
    • The whole application is based on modules.
    • It is desirable to integrate the external JAR file in the form of a module.
    • Enhances the consistency of the application as a whole.
    • You can also bundle multiple JAR files into a single module, after which you need no longer put the physical JAR files on the application classpath, as is normally done when developing applications.
  • Two very important things:
    • It marked all packages in the third-party library with the attribute OpenIDE-Module-Public-Packages, making all these packages publicly accessible.
    • Marked the library it found in the ext/ folder with the Class-Path attribute, putting it on the module classpath.
  • It is advisable to always use a library wrapper module when integrating a third-party library into an application.

No comments: