码迷,mamicode.com
首页 > Windows程序 > 详细

Eclipse: export project such that Windows and Mac can both run it (SWT)

时间:2020-07-19 23:37:21      阅读:101      评论:0      收藏:0      [点我收藏+]

标签:his   github   als   read   pos   ems   system   question   port   

 

---------------

You appear to be running a SWT application. On macOS you must specify the -XstartOnFirstThread option when running the jar to run SWT correctly:

jar -XstartOnFirstThread -jar xxxx.jar

SWT applications also have a native library which is different for each platform.

---------------

You have to add the correct SWT.jar to the classpath. You can download them here. (https://www.eclipse.org/swt/)

If you are deploying for Windows, you will have to bundle the swt jar for Windows (either 32bit or 64bit depending on the system).

If you want to create an application that runs on all platforms, have a look at this post:

Create cross platform Java SWT Application (https://stackoverflow.com/questions/2706222/create-cross-platform-java-swt-application/3204032#3204032)

---------------

 

REF

https://stackoverflow.com/questions/2706222/create-cross-platform-java-swt-application/3204032#3204032

https://stackoverflow.com/questions/16567936/swt-running-an-application-developed-on-osx-in-windows

https://stackoverflow.com/questions/42777000/eclipse-export-project-such-that-windows-and-mac-can-both-run-it

 https://stackoverflow.com/questions/3959556/problems-with-loading-resources-during-execution

http://mchr3k.github.io/swtjar/

 

Eclipse: export project such that Windows and Mac can both run it (SWT)

标签:his   github   als   read   pos   ems   system   question   port   

原文地址:https://www.cnblogs.com/emanlee/p/13341691.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!