默认eclipse工作目录 [英] Default eclipse working directory

查看:85
本文介绍了默认eclipse工作目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Eclipse 3.4.1中设置默认工作目录?默认情况下是:

Is it possible to set a default working directory in Eclipse 3.4.1? By Default that is:

$ {workspace_loc :(项目名称)}

${workspace_loc:(project name)}

但是我想要它像

$ {custom_var}

${custom_var}

每个类,我可以更改运行配置 - >参数 - >工作目录为其他,但如果可以更改默认值,则会更好。我有很多类需要从特定目录运行。

Per class, I can change the Run configuration -> arguments -> Working directory to "Other", but it's better if the default can be changed. I have a lot of classes that needs to be run from that particular directory.

推荐答案

你可以做一件事是设置一个启动配置,然后右键单击它并选择重复。这将保留所有的参数。

One thing you can do is set up one launch configuration and then right-click it and choose "duplicate". This will keep all the arguments.

不完美,但AFAIK没有办法更改默认工作目录。

Not perfect, but AFAIK there is no way to change the default working dir, though.

您还可以使用字符串替换(Window-> Preferences-> Run / Debug-> String Substitution)设置您想要的目录,然后在每个运行配置中使用该变量 - 您仍然必须设置它而不是每次选择该变量时选择目录。

You can also set the dir you want as a string substitution (Window->Preferences->Run/Debug->String Substitution) and then use that variable in each run config - you'll still have to set it but instead of picking the dir each time you just choose the variable.

这篇关于默认eclipse工作目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆