【发布时间】:2010-04-30 17:48:28
【问题描述】:
我有一个使用 SWT UI 的 java 项目,但我无法在任何 Mac OS X 计算机上部署它。该程序本身可以在 Windows 上完美运行,无论是在 Eclipse 中还是从 jar 文件中运行。在 Mac 上,该程序在 Eclipse 中也可以正常运行,但是当我尝试从 jar 文件运行它时,出现以下错误:
2010-04-30 13:33:04.564 java[17825:41b] *** _NSAutoreleaseNoPool(): Object 0x10b9b0 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x944acf4f 0x943b9432 0x678fb79 0x35a19b1 0x359ba7f)
2010-04-30 13:33:04.566 java[17825:41b] *** _NSAutoreleaseNoPool(): Object 0x115ef0 of class NSCFNumber autoreleased with no pool in place - just leaking
Stack: (0x944acf4f 0x943b9432 0x678a0b0 0x35a19b1 0x359ba7f)
2010-04-30 13:33:04.567 java[17825:41b] *** _NSAutoreleaseNoPool(): Object 0x121000 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x944acf4f 0x943b9432 0x678fb79 0x35a19b1)
2010-04-30 13:33:04.581 java[17825:41b] *** _NSAutoreleaseNoPool(): Object 0x123720 of class NSPathStore2 autoreleased with no pool in place - just leaking
Stack: (0x944acf4f 0x943ba637 0x943c238f 0x943c1e8e 0x943c694b 0x678992e 0x35a19b1)
2010-04-30 13:33:04.582 java[17825:41b] *** _NSAutoreleaseNoPool(): Object 0x12d660 of class NSPathStore2 autoreleased with no pool in place - just leaking
Stack: (0x944acf4f 0x943ba637 0x943b9739 0x943c3eb2 0x943c6b22 0x678992e 0x35a19b1)
...
...
...
实际的错误要大得多,并一直持续到程序崩溃。
我知道我使用了正确的 swt.jar 文件,并且我尝试使用 -XstartOnFirstThread VM 参数运行程序,但仍然没有任何运气。
是否有人有任何想法或建议可以让我开始寻找解决方案?
谢谢。
【问题讨论】:
-
我要做的第一件事是尝试 Eclipse 的 Carbon 和 Cocoa 版本,看看是否有区别。
-
涉及哪些版本的Mac OS X、Java和Eclipse?