What does the -XstartOnFirstThread VM argument do / mean?

I cannot find documentation for the VM argument -XstartOnFirstThread . It seems necessary for me to run JOGL through LWJGL on my Mac. What does it mean? Some process seems to want thread 0. Is this correct?

Please note: I have a run() method in my main class. This does not seem to change anything, and I am not implementing runnable.

Sample source code that I run here: http://www.lwjgl.org/guide

+8
source share
1 answer

Starting with Java 1.7.0_u4, this option is documented in java -X on the Mac OSX platform.

This option forces the JVM to use thread 0 to start the application. Obviously, this is necessary for Mac OSX and the SWT and GWT applications to work properly. According to the Eclipse SWT FAQ , AWT and Swing applications use some undocumented magic to do this.

+8
source

Source: https://habr.com/ru/post/981543/


All Articles