[OSX,SWT] Error Display must be created on main thread due to Cocoa restrictions.
문제:
***WARNING: Display must be created on main thread due to Cocoa restrictions.
Exception in thread "main" org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4361)
at org.eclipse.swt.SWT.error(SWT.java:4276)
at org.eclipse.swt.SWT.error(SWT.java:4247)
at org.eclipse.swt.widgets.Display.error(Display.java:1068)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:825)
at org.eclipse.swt.widgets.Display.create(Display.java:808)
at org.eclipse.swt.graphics.Device.<init>(Device.java:130)
at org.eclipse.swt.widgets.Display.<init>(Display.java:699)
at org.eclipse.swt.widgets.Display.<init>(Display.java:690)
at kr.or.utac.testAlienReader.TestAlienReaderUI.<init>(TestAlienReaderUI.java:148)
at kr.or.utac.testAlienReader.ExecuteTestAlienReader.main(ExecuteTestAlienReader.java:16)
해결:
-XstartOnFirstThread