Are there any Java compilers out there that use the OSGi environment instead of using the classpath?
Are there ways to make javac
use of the existing OSGi framework to resolve build-time dependencies instead of explicitly specifying the classpath? I know I can write an OSGi component that uses the JDK Compiler-API, but I think there should be a simpler solution.
Alternatively, if such an extension is not available for javac
, allows you ejc
to resolve such a thing (can be used from the command line, I would agree to accept the Equinox solution with only ejc
)?
a source to share
You are missing one obvious Java compiler that follows OSGi rules - Eclipse.
You can use the Eclipse compiler to create a headless assembly, but be careful, this is not for the faint of heart.
Here is a simple tutorial on building with Eclipse and ant.
If you go that route, I suggest looking at Tycho (a Maven subproject for generating OSGi stuff) and Buckminster , an Eclipse project.
a source to share
I am developing in the Lotus Expeditor Toolkit and the Eclipse Plugin is a free download. My build-time and run-time paths are very easy to manage with entries in the Manifest.
[disclaimer: I am an IBM employee.]
a source to share