Welcome to JiKe DevOps Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
593 views
in Technique[技术] by (71.8m points)

java - What does the -XstartOnFirstThread VM Argument do / mean?

I can't find documentation for the VM argument -XstartOnFirstThread. Seems necessary for me to run JOGL through LWJGL on my Mac. What does it mean? It seems to be that some process wants thread 0. Is this correct?

Please note: I have a run() method in my main class. It doesn't seem to be overriding anything and I'm not implementing runnable.

Example source code I'm running here: http://www.lwjgl.org/guide

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

Please log in or register to answer this question.

1 Answer

0 votes
by (71.8m points)

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

The option causes the JVM to use thread 0 to start the application. Apparently this is necessary to get Mac OSX to run SWT and GWT apps properly. According to the Eclipse SWT FAQ, AWT and Swing apps use some undocumented magic to do this.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to JiKe DevOps Community for programmer and developer-Open, Learning and Share
...