Talin
Talin

Reputation: 1415

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 case. 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.

Upvotes: 0

Views: 719

Answers (1)

Prakash G. R.
Prakash G. R.

Reputation: 4892

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

Upvotes: 2

Related Questions