Java Mac OS How do I get -XstartOnFirstThread to implement when launching from finder?

廉价感情. 提交于 2019-12-11 23:35:45

问题


I've created a jar file that uses SWT for the UI. When launching the jar file from finder it would return an error saying

Exception in thread "main" org.eclipse.swt.SWTException: Invalid thread access

I finally got it to launch from Terminal using

java -XstartOnFirstThread -jar CommonDenom.jar

That's all well and good, but how do I implement the -XstartOnFirstThread switch when launching from finder? Is there a simple way to do this through the manifest or something or do I have to package a launch script? if the latter, can someone show me how? Thanks.

来源:https://stackoverflow.com/questions/22277108/java-mac-os-how-do-i-get-xstartonfirstthread-to-implement-when-launching-from-f

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!