MCPcopy Create free account
hub / github.com/HumbleUI/JWM / start

Method start

shared/java/App.java:25–37  ·  view source on GitHub ↗

Start the JWM application, blocking until completion. User init should be handled inside the `launcher` callback (on the main thread). This method must be the first method called in the JWM library. After this method call, library API can be safely accessed for creating wind

(@NotNull Runnable launcher)

Source from the content-addressed store, hash-verified

23 * <p>After this method call, library API can be safely accessed for creating windows and querying system info.</p>
24 */
25 public static void start(@NotNull Runnable launcher) {
26 Library.load();
27 ClassLoader cl = Thread.currentThread().getContextClassLoader();
28 _nStart(() -> {
29 Thread t = Thread.currentThread();
30 t.setContextClassLoader(cl);
31 _uiThreadId = t.getId();
32 Log.setVerbose("true".equals(System.getenv("JWM_VERBOSE")));
33 long t0 = System.currentTimeMillis();
34 Log.setLogger((s) -> System.out.println("[ " + (System.currentTimeMillis() - t0) + " ] " + s));
35 launcher.run();
36 });
37 }
38
39 /**
40 * <p>Make new native platform-specific window.</p>

Callers 3

mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95

Calls 6

loadMethod · 0.95
_nStartMethod · 0.95
setVerboseMethod · 0.95
setLoggerMethod · 0.95
equalsMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected