From aeaa66e85cafb9efb1a4e109267fb82529502bd4 Mon Sep 17 00:00:00 2001 From: connorhartley Date: Sat, 1 Apr 2023 11:18:57 +1300 Subject: [PATCH] set context classloader to the transforming classloader to fix slf4j serviceloader --- .../vectrix/ignite/applaunch/handler/IgniteLaunchService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/launcher/src/main/java/space/vectrix/ignite/applaunch/handler/IgniteLaunchService.java b/launcher/src/main/java/space/vectrix/ignite/applaunch/handler/IgniteLaunchService.java index b1303bd..2debd1c 100644 --- a/launcher/src/main/java/space/vectrix/ignite/applaunch/handler/IgniteLaunchService.java +++ b/launcher/src/main/java/space/vectrix/ignite/applaunch/handler/IgniteLaunchService.java @@ -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.