OK, the resources that you need to read are:
- First, you need to read an awesome Background Article at borderland Consulting
- Then, you'll want the very cool jar bundler ant task which will put together an app bundle for you and copy all your jars into the right directory structure and create an info. plist file for you
- Then (and this bit just killed me), youMust make sureThat you chmod your. jnilib files executable! If you don't, you'll end up getting a "cocould not Load Library" error even though the SWT library is clearly in your java. Library. path!
- Finally, you must add an entry Startonmainthread
To your info. plist file which resolved some threading issues with the launcher. if you're getting weird GUI behaviour with disappearing buttons and bizarre crashes, it will probably be cause you 've missed this setting.
No swt-carbon-3346 or SWT-carbon in SWT. Library. Path, java. Library. path or the JAR file meaning that if SWT is appliedProgramWhen the SWT component is used, you must add the SWT localization file to the path that the JVM can find. There are three methods:
1. Modify the runtime VM parameters of each project, and notify jvm of the localized swt library file with-djava. Library. Path = {runtime-library-path. Obviously, this refers to running on the eclipse platform, and every project must be modified once, which is very troublesome.
2. Set the library path in the environment variable. For Linux, you can modify the environment variable LD_LIBRARY_PATH to indicate it to the local SWT library.
3. Copy the local SWT library file to the specified Java library path.