Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在linux系统中启动e4应用程序的多个exe实例时出错_Linux_Swt_Rcp_Multiple Instances_E4 - Fatal编程技术网

在linux系统中启动e4应用程序的多个exe实例时出错

在linux系统中启动e4应用程序的多个exe实例时出错,linux,swt,rcp,multiple-instances,e4,Linux,Swt,Rcp,Multiple Instances,E4,我正在使用-data@none创建e4 rcp应用程序的多个实例。通过使用此选项,可以在Windows 7中成功创建多个实例,但当我在终端中通过./applicationname在linux中运行应用程序时,它会抛出一个错误,因为关联的工作区已在使用中。那么我们如何在linux中创建多个实例呢?请帮助解决此问题。应用程序确实需要工作区位置。您可以在LifeCycle@PostContextCreate方法中设置一个: @PostContextCreate public void postCont

我正在使用-data@none创建e4 rcp应用程序的多个实例。通过使用此选项,可以在Windows 7中成功创建多个实例,但当我在终端中通过./applicationname在linux中运行应用程序时,它会抛出一个错误,因为关联的工作区已在使用中。那么我们如何在linux中创建多个实例呢?请帮助解决此问题。

应用程序确实需要工作区位置。您可以在LifeCycle
@PostContextCreate
方法中设置一个:

@PostContextCreate
public void postContextCreate()
{
位置instanceLoc=Platform.getInstanceLocation();
//-数据@未指定?
if(instanceLoc==null)
回来
//如果设置了位置,则确定
if(instanceLoc.isSet())
回来
//TODO构造工作区位置
instanceLoc.set(位置的url,false);
}

org.eclipse.e4.ui.workbench.swt.e4应用程序实际上需要一个工作区位置,因此我认为您的Windows代码可能没有按照您的想法执行。在Windows上,
Platform.getInstanceLocation()
为您提供了什么?它提供了定位和执行的exe的路径。即使我需要像在Windows for linux系统中一样创建多个实例,如果指定了
-data@none
,则位置应为null。Platform.getInstanceLocation()在Windows PC中提供null,当我在启动Arguments中指定-data@none时,我们如何动态地更改location的url以设置实例loc