Java – Are there any Java-compilers that leverage an OSGi-environment instead of using the classpath

classpathjavajavacosgi

Are there any ways to make javac use an existing OSGi-environment for the resolution of build-time dependencies instead of setting the classpath explicitely? I know I could write an OSGi-component that uses the Compiler-API of the JDK, but I think there should be a more straightforward solution.

Alternatively, if no such extension is available for javac, does ejc allow such a thing (usable from the command line; I'd be willing to accept an Equinox-only solution with ejc)?

Best Answer

ant task to compile using osgi.

http://www.ohloh.net/p/osgijc

or here now I guess?

http://code.google.com/p/eclipseosgitools/