Running SWT on Mac error: Java. Lang. unsatisfiedlinkerror: No swt-carbon-3346 or SWT-carbon in SWT. Library. path,

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.