Bindgen is an annotation processor that you configure the Java compiler to run during its compilation run.
javacIf you’re using Ant, or just javac in general, you can use something like:
<javac destdir="bin/main" classpathref="main.classpath" debug="true" source="1.6" target="1.6"> <src path="src/main"/> <src path="src/codegen"/> <compilerarg value="-s"/> <compilerarg value="bin/apt-javac"/> <compilerarg value="-processor"/> <compilerarg value="org.exigencecorp.bindgen.processor.BindgenAnnotationProcessor"/> <compilerarg value="-Abindgen.skipExistingBindingCheck=true"/> <!-- for javac --> <compilerarg value="-XprintRounds"/> </javac>
Briefly:
-s bin/apt-javac will put the APT-generated code in that directory.-processor org.exigencecorp.bindgen.processor.BindgenAnnotationProcessor gives javac the class name of the bindgen processor to run-Abinding.skipExistingBindingCheck=true is a hack bindgen needs for javac that should go away, hopefully-XprintRounds outputs debug information about what round for annotation processing the compiler is currently onEclipse annotation processing is configured with Project Properties:
For Project Properties / Java Compiler
For Project Properties / Java Compiler / Annotation Processing
For Project Properties / Java Compiler / Annotation Processing / Factory Path
bindgen.jarI typically have Ivy download my dependencies into bin/jars and then have Eclipse reference it there, e.g. /ProjectName/bin/lib/main/jars/bindgen.jar.
There is an Ivy-compatible repo for Joist at: http://repo.joist.ws/.