Install4j 使用SWT安装4J无效线程访问

Install4j 使用SWT安装4J无效线程访问,install4j,Install4j,当使用64位JRE为MacOSX的SWT应用程序创建安装程序时,我们得到了一个 org.eclipse.swt.swt异常: Invalid thread access that we can trace to a line: Display display = new Display(). The error occurs when the application is launched after installation. 同样的程序在开发和任何使用Install4j创建的Windo

当使用64位JRE为MacOSX的SWT应用程序创建安装程序时,我们得到了一个 org.eclipse.swt.swt异常:

Invalid thread access that we can trace to a line:
Display display = new Display().  
The error occurs when the application is launched after installation.
同样的程序在开发和任何使用Install4j创建的Windows安装中都可以正常运行。除了确保为目标平台提供适当的SWT jar外,使用Mac OSX安装程序是否还需要做一些不同的事情


实际上,这似乎是在使用Install4j安装后在MacOSX上启动的本地化操作。

在Install4j中编辑您的启动程序,转到“可执行信息”步骤并选中“使用SWT或QT”复选框。那么它应该会起作用



更新:对于Apple JRE,上述内容已足够,但对于Oracle JRE,必须添加VM参数
-XstartOnFirstThread
。从install4j 5.1.9开始,这将自动添加。

这已被选中,以及“如果引发主线程中的异常,则失败”。请尝试将VM参数-XstartOnFirstThread添加到启动器谢谢Ingo。这很有效。谢谢你的帮助,谢谢你的确认。