开发者

Problem Setting VM Arguments with Eclipse 3.5.2

I upgraded my Eclipse application from 3.4.1 to 3.5.2 a开发者_运维百科nd up until this point, I had no problems.

What I'm experiencing now has to do with the VM arguments. I'm trying to set them in the main plugin's *.product file, under the "Launching" tab as such:

-DSTANDALONE -Xmx500M -Duser.dir=${project_loc}/..

However, instead of having user.dir set to the right value, it's always equal to /.., meaning that Eclipse isn't substituting its project_loc variable in that argument.

I've also tried a number of different variables there, including ProjDirPath, and not a single variable gets substituted properly.

Any idea what I'm doing wrong here?


As mentioned in this thread:

${ProjDirPath} is not a generic Eclipse substitution variable. It is usable only in the context of the CDT build system.

In 3.4.1, as illustrated by bug 227591, ${project_loc} was still referenced by debug.ui, before being moved to debug.core.

when a variable like ${project_loc} is reference without an argument, the resolution will also resolve the value of ${selected_resource_path}, else it can perform the resolution without the selected resource.

So, when a variable is not qualified with an argument, it still requires the UI, but the variables can be used headless when arguments are specified.

In your case, did you try with an argument?

${project_loc:/MyProject}

The latter variant uses the argument and interprets it as a workspace-relative path. No selection is required. It is save to evaluate on any thread.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜