propertiesData = null;
}
+ MemorySegment ui_set_main_thread_error_msg_addr = lib.find("ui_set_main_thread_error_msg").orElseThrow();
+ MethodHandle ui_set_main_thread_error_msg = linker.downcallHandle(ui_set_main_thread_error_msg_addr, FunctionDescriptor.ofVoid(ValueLayout.ADDRESS));
+ try (Arena arena = Arena.ofConfined()) {
+ MemorySegment cstr = arena.allocateFrom("Add -XstartOnFirstThread to the JVM options.");
+ ui_set_main_thread_error_msg.invoke(cstr);
+ } catch (Throwable e) {
+ e.printStackTrace();
+ System.exit(1);
+ }
+
// get init function
MemorySegment ui_init_addr = lib.find("ui_init").orElseThrow();
FunctionDescriptor ui_init_sig = FunctionDescriptor.ofVoid(ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS);