简体   繁体   English

根据操作系统选择SWT库

[英]Select SWT Library depending on OS

How do I ensure when I distribute a JAR-file that the proper SWT-library (either the windows, the linux or mac version) is loaded an ready to use? 如何在分发JAR文件时确保正确的SWT库(Windows,Linux或Mac版本)已经可以使用了? It would be very helpful because then you can do one export and your application can run on any platform like Swing apps usually do. 这将非常有帮助,因为这样您就可以执行一次导出,并且您的应用程序可以像Swing应用程序通常在任何平台上运行。

Thanks a lot 非常感谢

可以使用此答案中描述的装入程序类完成此操作: 创建跨平台Java SWT应用程序

You looking for the delta-pack. 您在寻找增量包装。 The delta pack archive contains all the platform specific fragments from the Eclipse SDK. 增量包归档文件包含Eclipse SDK中所有平台特定的片段。

See http://aniefer.blogspot.com/2009/06/using-deltapack-in-eclipse-35.html 看到http://aniefer.blogspot.com/2009/06/using-deltapack-in-eclipse-35.html

Thanks a lot for the answer. 非常感谢您的回答。 Sounds like I have to distribute my app per platform. 听起来我必须按平台分发我的应用程序。 In comparison to Swing this is a disadvantage, but I love the native widgets ;) 与Swing相比,这是一个缺点,但是我喜欢本机小部件;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM