Java 11: application modules are not found when running in CLI

Description

In CLI we use the context ClassLoader of the current (main) thread to inject JAR files from the configuration directory. As the CLI classes are loaded by the system ClassLoader we should switch to the contextClassLoader if we load other resources or classes via reflection. This would ensure the right behavior in CLI and in a Servlet container.

MCRClassTools should provide to methods to load classes and to get the right ClassLoader to read resources.

Environment

None

Activity

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created January 16, 2019 at 2:05 PM
Updated February 15, 2019 at 12:49 PM
Resolved February 4, 2019 at 12:23 PM