简体   繁体   English

Eclipse RCP:特定于应用程序的文件夹

[英]Eclipse RCP: application specific folder

I have an RCP application in Eclipse 4.x for a cross-platform software. 我在Eclipse 4.x中有一个用于跨平台软件的RCP应用程序。 I would like to place the osgi.instance.area in the application specific folder. 我想将osgi.instance.area放在应用程序特定的文件夹中。 For example on Windows it generally is C:\\Users[Username]\\AppData[Name]. 例如,在Windows上,通常为C:\\ Users [用户名] \\ AppData [名称]。 Something similar to the directories outlined here - http://www.chromium.org/user-experience/user-data-directory . 类似于此处概述的目录-http: //www.chromium.org/user-experience/user-data-directory

I have seen the solution here - https://bugs.eclipse.org/bugs/show_bug.cgi?id=241192 but I haven't understood it really well. 我在这里看到了解决方案-https: //bugs.eclipse.org/bugs/show_bug.cgi?id=241192,但我不太了解。 I use the product editor on Eclipse and under the Configuration tab, I have added the osgi.instance.area property in the Properties section with another directory at the moment. 我在Eclipse上使用产品编辑器,并在“配置”选项卡下,在“属性”部分中添加了osgi.instance.area属性,此刻带有另一个目录。

Then I tried the solution from the bug - $APPDATA$/COMPANY/PROGRAM/instance but I couldn't find the directory anywhere at the expected location. 然后,我尝试了通过错误- $APPDATA$/COMPANY/PROGRAM/instance的解决方案,但是我找不到目录的预期位置。 Also, how does this work for Linux and Mac OS X? 另外,这对Linux和Mac OS X如何起作用?

I think it is the osgi.instance.area.default property that you should set. 我认为这是您应该设置的osgi.instance.area.default属性。 The value migght be something like @user.home/Documents/workspace 值migght类似于@user.home/Documents/workspace

In Windows 7 and 8 $APPDATA$ is C:\\Users[Username]\\AppData\\Roaming. 在Windows 7和8中,$ APPDATA $是C:\\ Users [用户名] \\ AppData \\ Roaming。 In Linux $APPDATA$ is undefined. 在Linux中,$ APPDATA $是未定义的。 You should use @none, @noDefault, @user.home, @user.dir, filepath or url 您应该使用@ none,@ noDefault,@ user.home,@ user.dir,文件路径或url

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

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