[I] [ModLib] Restarting game with ModLib launcher.
[I] [ModLib] Extracting ModLib launcher...
[E] Unable to add current java arguments: java.lang.NoClassDefFoundError: java/lang/management/ManagementFactory
at fr.redstonneur1256.modlib.launcher.LauncherInitializer.initialize(LauncherInitializer.java:73)
at fr.redstonneur1256.modlib.ModLib.(ModLib.java:12)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
at mindustry.mod.Mods.loadMod(Mods.java:971)
at mindustry.mod.Mods.load(Mods.java:465)
at mindustry.Vars.init(Vars.java:337)
at mindustry.Vars.loadAsync(Vars.java:258)
at arc.assets.AssetManager$2.loadAsync(AssetManager.java:352)
at arc.assets.AssetLoadingTask.call(AssetLoadingTask.java:52)
at arc.assets.AssetLoadingTask.call(AssetLoadingTask.java:16)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: java.lang.management.ManagementFactory
at mindustry.mod.ModClassLoader.findClass(ModClassLoader.java:27)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at mindustry.core.Platform$1.loadClass(Platform.java:37)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at mindustry.mod.ModClassLoader.findClass(ModClassLoader.java:38)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at mindustry.core.Platform$1.loadClass(Platform.java:37)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 18 more
This happens when using the JVM bundled with the game, it's not an actual error but rather a warning, it can be safely ignored unless you modified the game launch command line.
[I] [ModLib] Restarting game with ModLib launcher. [I] [ModLib] Extracting ModLib launcher... [E] Unable to add current java arguments: java.lang.NoClassDefFoundError: java/lang/management/ManagementFactory at fr.redstonneur1256.modlib.launcher.LauncherInitializer.initialize(LauncherInitializer.java:73) at fr.redstonneur1256.modlib.ModLib.(ModLib.java:12)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
at mindustry.mod.Mods.loadMod(Mods.java:971)
at mindustry.mod.Mods.load(Mods.java:465)
at mindustry.Vars.init(Vars.java:337)
at mindustry.Vars.loadAsync(Vars.java:258)
at arc.assets.AssetManager$2.loadAsync(AssetManager.java:352)
at arc.assets.AssetLoadingTask.call(AssetLoadingTask.java:52)
at arc.assets.AssetLoadingTask.call(AssetLoadingTask.java:16)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: java.lang.management.ManagementFactory
at mindustry.mod.ModClassLoader.findClass(ModClassLoader.java:27)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at mindustry.core.Platform$1.loadClass(Platform.java:37)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at mindustry.mod.ModClassLoader.findClass(ModClassLoader.java:38)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at mindustry.core.Platform$1.loadClass(Platform.java:37)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 18 more
It happened to me in both PopOS and WIn11