OpenRocket leverages the **Java Platform Module System** (**JPMS**) to enhance modularity, encapsulation, and maintainability.
JPMS allows OpenRocket to be organized into two distinct modules, the ``core`` module and the ``swing`` module,
each with its own well-defined boundaries and dependencies.
Each module in OpenRocket is described by a `module-info.java` file located at the root of the module's source directory
(*<module>/src/main/java.module-info.java*). This file declares:
***Module Name:** A unique identifier for the module (e.g., `info.openrocket.core`, `info.openrocket.swing`).
***Dependencies:** The modules that this module depends on to function correctly. For example, the `info.openrocket.swing` module depends on the `info.openrocket.core` module.
***Exported Packages:** The packages within the module that are accessible to other modules.
***Services:** The services provided or consumed by the module (if applicable).
By embracing JPMS, OpenRocket gains several advantages:
***Strong Encapsulation:** Modules explicitly control what packages are exposed, preventing accidental access to internal implementation details.
***Reliable Configuration:** The module system verifies dependencies at compile time and runtime, reducing the risk of missing or incompatible components.
***Improved Maintainability:** Modules can be developed and tested independently, making it easier to understand, modify, and evolve the codebase.
***Scalability:** The modular structure facilitates the addition of new features or the replacement of existing components without impacting the entire application.
For an overview of the changes between file format versions, see the `fileformat.txt <https://github.com/openrocket/openrocket/blob/unstable/fileformat.txt>`_