简体   繁体   English

带有SWT的JavaApplicationStub导致问题

[英]JavaApplicationStub with SWT causing problems

I created an application in Eclipse that uses SWT for the GUI. 我在Eclipse中创建了一个将SWT用于GUI的应用程序。 I've attempted to deploy the application using the Eclipse deploy, but it seems that when I do that, LSUIElement is not respected, and I can't force the application to disappear from the dock. 我曾尝试使用Eclipse部署来部署应用程序,但似乎这样做时,LSUIElement没有得到尊重,并且我不能强迫应用程序从扩展坞中消失。 Nonwhistanding that issue, the application actually deploys ok and is runnable. 毫无疑问,该应用程序实际上可以正常部署并且可以运行。

I attempted to deploy the application using Jar Bundler, but when I try to run the application, I get the following errors: 我试图使用Jar Bundler部署应用程序,但是当我尝试运行该应用程序时,出现以下错误:

2010-06-09 21:44:02.564 JavaApplicationStub[89045:2003] * __NSAutoreleaseNoPool(): Object 0x10021f260 of class NSCFString autoreleased with no pool in place - just leaking 2010-06-09 21:44:02.568 JavaApplicationStub[89045:2003] __NSAutoreleaseNoPool(): Object 0x10010a0a0 of class NSCFNumber autoreleased with no pool in place - just leaking 2010-06-09 21:44:02.569 JavaApplicationStub[89045:2003] __NSAutoreleaseNoPool(): Object 0x1001127a0 of class NSCFString autoreleased with no pool in place - just leaking 2010-06-09 21:44:02.582 JavaApplicationStub[89045:2003] __NSAutoreleaseNoPool(): Object 0x7fff70b7af70 of class NSCFString autoreleased with no pool in place - just leaking 2010-06-09 21:44:02.583 JavaApplicationStub[89045:2003] __NSAutoreleaseNoPool(): Object 0x100123ea0 of class NSCFData autoreleased with no pool in place - just leaking 2010-06-09 21:44:02.587 JavaApplicationStub[89045:2003] * __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

in a very, very, very, long list. 在非常非常长的清单中 The application launches and appears to hang with the icon constantly bouncing in the dock, and the first GUI menu only partially loaded (it looks like one of the text boxes is semi visible, and the overall rectangle is the right size, but the GUI is not showing properly. It is essentially hung.) 该应用程序启动并显示为挂起,并且图标不断在扩展坞中弹跳,并且第一个GUI菜单仅部分加载(看起来像一个文本框是半可见的,并且整个矩形是正确的大小,但是GUI是不能正常显示。它实际上已挂起。)

I'm hoping someone has had experience with this problem, and may be able to help! 我希望有人对这个问题有经验,并且能够为您提供帮助!

Thanks! 谢谢!

For a bundled Java application on the Mac you need to add the property StartOnMainThread set to 'true' inside a dictionary named 'Java' in your Info.plist. 对于Mac上的捆绑Java应用程序,您需要在Info.plist中名为“ Java”的字典内添加属性StartOnMainThread,将其设置为“ true”。 That should take care of the autorelease pool warnings. 那应该注意自动释放​​池警告。 From the code I see in Cocoa's implementation of Display, you also need to make sure you have CFBundlePackageType of 'APPL' in your Info.plist. 从我在Cocoa的Display实现中看到的代码中,还需要确保Info.plist中的CFBundlePackageType为'APPL'。

See this PDF file for more information about making an Info.plist with Jar Bundler. 有关使用Jar Bundler制作Info.plist的更多信息,请参见此PDF文件

I see you added a comment to this SWT bug . 我看到您对此SWT错误添加了评论。 Make sure you have these two values set and you should be okay. 确保设置了这两个值,并且应该没问题。

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

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