Alix
Alix

Reputation: 925

Eclipse: Java application as project builder

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:

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

Upvotes: 2

Views: 900

Answers (2)

Xavier Portebois
Xavier Portebois

Reputation: 3504

To complete wero answer, as I struggle a bit to find the right parameters, here what it could look like:

eclipse builder screenshot

Upvotes: 0

wero
wero

Reputation: 33000

You can choose "External Program" and enter these values in tab main:

  • Location: path to java binary
  • working directory: your project A location (or whatever you expect when you run B)
  • Arguments: classpath, main class of B and 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.

Upvotes: 2

Related Questions