Class Launcher
java.lang.Object
org.openpatch.scratch.Launcher
Starts a program so that its window runs on the process's first thread, which macOS requires
(with
-XstartOnFirstThread); the program's main runs on a second thread. Studio
starts every run and every exported game this way; a plain java
run does not need it.
java -XstartOnFirstThread -cp game.jar org.openpatch.scratch.Launcher MyGame
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisActive()Whether the window has to run on the first thread.static voidstatic voidrunOnFirstThread(Runnable windowLoop) Hands the window loop to the first thread; it does not return before the program ends.
-
Method Details
-
isActive
public static boolean isActive()Whether the window has to run on the first thread. -
runOnFirstThread
Hands the window loop to the first thread; it does not return before the program ends. -
main
-