GLFW Window Crashing Even With “-XstartOnFirstThread” In VM Arguments
问题 I have "-XstartOnFirstThread" in my VM arguments, however I am still getting the error message: Exception in thread "Thread-0" java.lang.ExceptionInInitializerError at org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1248) at Main.init(Main.java:33) at Main.run(Main.java:56) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalStateException: GLFW windows may only be created on the main thread. at org.lwjgl.glfw.EventLoop$OffScreen.<clinit>(EventLoop.java:39) ... 4 more My Code: