开发者

Sharing run configurations across multiple projects in the same eclipse workspace

I have an eclipse workspace containing two projects, which I'll call foo-lib and foo-app. Most of the code is in foo-lib, while foo-app is just a small shell which runs the code in foo-lib. foo-lib compiles to a jar file, while foo-app links against foo-lib and compiles to a program.

OK so now I have a run configuration that I use to test the program. Eclipse won't let me create a run configuration for foo-lib since there is no 'main' function. So I have one in foo-app.

Most of the time when I am editing I have open one of the source files for foo-lib, not foo-app. Thus, when I click on the green "run" button, it puts up a dialog asking if I want to run as a Java Application or Applet, neither of which works in this ca开发者_运维技巧se. Instead, I have to go to the drop-down menu next to the run button and explicitly select the run configuration for foo-app.

Is there any way to make the default run configuration for foo-lib to be the one in foo-app? I tried making the run configuration "shared" but that doesn't seem to help.


Go to: Preferences->Run/Debug/Launching. There you can configure the launch operation to Always launch the previous application.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜