gpt4 book ai didi

java - RCP 应用程序未重新启动

转载 作者:行者123 更新时间:2023-11-29 04:44:48 25 4
gpt4 key购买 nike

我有自己的 IApplication 并将 start() 修改为:

@Override
public Object start( IApplicationContext context )
{
LOGGER.debug( "Application.start(IApplicationContext context " + context + ")" );

Display display = PlatformUI.createDisplay();
try
{
int returnCode = PlatformUI.createAndRunWorkbench( display, new ApplicationWorkbenchAdvisor() );
if (returnCode == PlatformUI.RETURN_RESTART)
{
return IApplication.EXIT_RESTART;
}

return IApplication.EXIT_OK;
}
finally
{
display.dispose();
}
}

然后我在我的处理程序之一中为我的按钮之一调用 PlatformUI.getWorkbench().restart();。当我在 Eclipse 中运行时它工作正常,但当我构建为 java webstart 时应用程序只是关闭。

我读了这个link据我了解,如果它不是由 eclipse.exe 启动的,它将无法运行。但是,我还没有找到它的最终解决方案。有什么想法吗?

最佳答案

来自 Eclipse help关于使用 Java Web Start:

Known limitations

Request to exit the application with a restart code are ignored;

所以目前这是不可能的。

关于java - RCP 应用程序未重新启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37653464/

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