I'm working in eclipse and I would like to set up a project builder for project A (a plugin-in project) so that whenever a resource in project A is modified, a Java application is launched. The Java application in question exists in my workspace as project B (a Java project) and I have a Java launch configuration for it.
When I go to Properties> Builders in project A and I try to either create a new builder or import an existing one, the only options are:
- Ant task
- External tool
I could package project B and all its dependencies in a runnable JAR and launch it via an ant task, but this seems like overkill when I actually have the B's launch configuration available right there, in the workspace. Is there any way to use B's launch configuration in the project builder? If not, what is the best alternative? My google skills are failing me in finding this out.
Thanks
2 Answers 2
You can choose "External Program" and enter these values in tab main:
- Location: path to
javabinary - working directory: your project A location (or whatever you expect when you run
B) - Arguments: classpath, main class of
Band additional arguments (i.e. all the values of your existing launch config).
This still copies the launch config but at least you don't need to create an ant build file.
3 Comments
${project_classpath:B}) so actually this solution is perfect for my purposes :)B changes things the changes are immediately reflected in ecplise. This is a handy feature not available for normal launch configs.To complete wero answer, as I struggle a bit to find the right parameters, here what it could look like:
org.eclipse.core.resources.buildersextension point.