Skip to content

Commit

Permalink
set context classloader to the transforming classloader to fix slf4j …
Browse files Browse the repository at this point in the history
…serviceloader
  • Loading branch information
vectrixdevelops committed Mar 31, 2023
1 parent 40138f7 commit aeaa66e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ private URL computeNext() {
* @param launchClassLoader The transforming class loader to load classes with
*/
private void launchService0(final @NonNull String[] arguments, final @NonNull ITransformingClassLoader launchClassLoader) throws Exception {
Thread.currentThread().setContextClassLoader((ClassLoader) launchClassLoader);

final Path launchJar = Blackboard.getProperty(Blackboard.LAUNCH_JAR);
if (launchJar != null && Files.exists(launchJar)) {
// Invoke the main method on the provided ClassLoader.
Expand Down

0 comments on commit aeaa66e

Please sign in to comment.