Skip to content
Advertisement

Forge MDK runClient crashing, likely because of LWJGL. How can I fix it?

I tried to build the example mod which comes with the 1.12.2 MDK, gradlew setupDecompWorkspace, gradlew eclipse and even gradlew build work fine, only when I try to run gradlew runClient it crashes immediately and prints the following error/stack trace:

[21:02:20] [main/ERROR] [LaunchWrapper]: Unable to launch
java.lang.reflect.InvocationTargetException: null
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_242]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_242]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_242]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_242]
        at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
        at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_242]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_242]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_242]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_242]
        at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
        at GradleStart.main(GradleStart.java:25) [start/:?]
Caused by: java.lang.ExceptionInInitializerError
        at org.lwjgl.LinuxSysImplementation.<clinit>(LinuxSysImplementation.java:50) ~[lwjgl-2.9.4-nightly-20150209.jar:?]
        at org.lwjgl.Sys.createImplementation(Sys.java:131) ~[lwjgl-2.9.4-nightly-20150209.jar:?]
        at org.lwjgl.Sys.<clinit>(Sys.java:116) ~[lwjgl-2.9.4-nightly-20150209.jar:?]
        at net.minecraft.client.Minecraft.getSystemTime(Minecraft.java:3159) ~[Minecraft.class:?]
        at net.minecraft.client.main.Main.main(Main.java:42) ~[Main.class:?]
        ... 12 more
Exception in thread "main" Caused by: java.lang.NullPointerException
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1847) ~[?:1.8.0_242]
        at java.lang.Runtime.loadLibrary0(Runtime.java:871) ~[?:1.8.0_242]
        at java.lang.System.loadLibrary(System.java:1124) ~[?:1.8.0_242]
        at java.awt.Toolkit$3.run(Toolkit.java:1636) ~[?:1.8.0_242]
        at java.awt.Toolkit$3.run(Toolkit.java:1634) ~[?:1.8.0_242]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_242]
        at java.awt.Toolkit.loadLibraries(Toolkit.java:1633) ~[?:1.8.0_242]
        at java.awt.Toolkit.<clinit>(Toolkit.java:1670) ~[?:1.8.0_242]
        at org.lwjgl.LinuxSysImplementation.<clinit>(LinuxSysImplementation.java:50) ~[lwjgl-2.9.4-nightly-20150209.jar:?]
        at org.lwjgl.Sys.createImplementation(Sys.java:131) ~[lwjgl-2.9.4-nightly-20150209.jar:?]
        at org.lwjgl.Sys.<clinit>(Sys.java:116) ~[lwjgl-2.9.4-nightly-20150209.jar:?]
        at net.minecraft.client.Minecraft.getSystemTime(Minecraft.java:3159) ~[Minecraft.class:?]
        at net.minecraft.client.main.Main.main(Main.java:42) ~[Main.class:?]
        ... 12 more
[21:02:20] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.reflect.InvocationTargetException
[21:02:20] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]:        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[21:02:20] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]:        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[21:02:20] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]:        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[21:02:20] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]:        at java.lang.reflect.Method.invoke(Method.java:498)
[21:02:20] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]:        at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
[21:02:20] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]:        at GradleStart.main(GradleStart.java:25)
[21:02:20] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: Caused by: net.minecraftforge.fml.relauncher.FMLSecurityManager$ExitTrappedException
[21:02:20] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]:        at net.minecraftforge.fml.relauncher.FMLSecurityManager.checkPermission(FMLSecurityManager.java:49)
[21:02:20] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]:        at java.lang.SecurityManager.checkExit(SecurityManager.java:761)
[21:02:20] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]:        at java.lang.Runtime.exit(Runtime.java:108)
[21:02:20] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]:        at java.lang.System.exit(System.java:973)
[21:02:20] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]:        at net.minecraft.launchwrapper.Launch.launch(Launch.java:138)
[21:02:20] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]:        at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
[21:02:20] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]:        ... 6 more

System Information:

  • OS: Ubuntu 18.04
  • Forge MDK: forge-1.12.2-14.23.5.2847-mdk
  • Graphics Driver: nvidia-driver-435
  • Java Version: 1.8.0_242

However I can still run (modded) Minecraft from the launcher without having this error.

Advertisement

Answer

I had this same issue. This question seemed to be the same problem, so I tried the fix it gave – downgrade from java 1.8_242 to 1.8_232. It worked, although it was difficult to find the right java version (it was on adoptopenjdk.net). Try running gradle with java 1.8_232.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement