gpt4 book ai didi

带有 SWT 的 JavaApplicationStub 导致问题

转载 作者:行者123 更新时间:2023-11-30 11:58:43 27 4
gpt4 key购买 nike

我在 Eclipse 中创建了一个使用 SWT 作为 GUI 的应用程序。我尝试使用 Eclipse 部署来部署应用程序,但似乎当我这样做时,LSUIElement 不受尊重,我无法强制应用程序从停靠栏中消失。尽管存在该问题,应用程序实际上部署正常并且可以运行。

我尝试使用 Jar Bundler 部署应用程序,但是当我尝试运行该应用程序时,出现以下错误:


2010-06-09 21:44:02.564 JavaApplicationStub[89045:2003] <strong>* __NSAutoreleaseNoPool(): Object 0x10021f260 of class NSCFString autoreleased with no pool in place - just leaking
2010-06-09 21:44:02.568 JavaApplicationStub[89045:2003] <em></em></strong><em> __NSAutoreleaseNoPool(): Object 0x10010a0a0 of class NSCFNumber autoreleased with no pool in place - just leaking
2010-06-09 21:44:02.569 JavaApplicationStub[89045:2003] <strong></strong></em><strong> __NSAutoreleaseNoPool(): Object 0x1001127a0 of class NSCFString autoreleased with no pool in place - just leaking
2010-06-09 21:44:02.582 JavaApplicationStub[89045:2003] <em></em></strong><em> __NSAutoreleaseNoPool(): Object 0x7fff70b7af70 of class NSCFString autoreleased with no pool in place - just leaking
2010-06-09 21:44:02.583 JavaApplicationStub[89045:2003] <strong></strong></em><strong> __NSAutoreleaseNoPool(): Object 0x100123ea0 of class NSCFData autoreleased with no pool in place - just leaking
2010-06-09 21:44:02.587 JavaApplicationStub[89045:2003] *</strong> __NSAutoreleaseNoPool(): Object 0x100225b90 of class NSCFDictionary autoreleased with no pool in place - just leaking
2010-06-09 21:44:02.588 JavaApplicationStub[89045:2003] *** __NSAutoreleaseNoPool(): Object 0x100225ee0 of class __NSFastEnumerationEnumerator autoreleased with no pool in place - just leaking

在一个非常非常非常长的列表中。应用程序启动并出现挂起,图标在停靠栏中不断弹跳,第一个 GUI 菜单仅部分加载(看起来其中一个文本框是半可见的,整个矩形大小合适,但 GUI 是显示不正确。它实际上是挂起的。)

我希望有人有过这个问题的经验,并且可以提供帮助!

谢谢!

最佳答案

对于 Mac 上的捆绑 Java 应用程序,您需要在 Info.plist 中名为“Java”的字典中添加设置为“true”的 StartOnMainThread 属性。那应该处理自动释放池警告。从我在 Cocoa 的 Display 实现中看到的代码,您还需要确保您的 Info.plist 中的 CFBundlePackageType 为“APPL”。

查看此 PDF file有关使用 Jar Bundler 制作 Info.plist 的更多信息。

我看到你在 this SWT bug 上添加了评论.确保设置了这两个值,应该没问题。

关于带有 SWT 的 JavaApplicationStub 导致问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3011699/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com