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

Assignee

Thomas Scheffler

Reporter

Thomas Scheffler

Labels

None

URL

None

External issue ID

None

Components

Fix versions

Affects versions

Priority

Medium
Configure