Why would you want to recompile the Jena source? Just put the Jena jar files on your classpath and create your class that extend the Jena class com.hp.hpl.jena.reasoner.rulesys.builtins.BaseBuiltin. Then you can register your builtin with the call
BuiltinRegistry.theRegistry.register((Builtin) myBuiltin); (Builtin is the Interface class for BaseBuiltin.) Your builtin will now work in your rules. Andy -----Original Message----- From: Richard Morgan [mailto:[email protected]] Sent: Thursday, March 13, 2014 7:51 AM To: [email protected] Subject: Creating my own builtins and compiling libraries in Eclipse Hi all, The last time I coded Java in anger was in version 1.02 since then things have changed a bit and the world is more exciting. I wish to start rolling my own Jena Rules functions by extending the Builtin class. I am using Eclipse, I have read and successfully followed the "A complete beginner's guide to starting a Jena project in Eclipse<http://www.iandickinson.me.uk/articles/jena-eclipse-helloworld/>" which has you download and link in the Jena libraries. I've also read the "The general purpose rule engine<http://jena.apache.org/documentation/inference/#rules>" which points me to builtins. The bit I'm struggling with then is how to actually import the Jena libraries into my project and compile them so that my builtin is available. Initially I thought that I would be able to import or load the project files from the jena-2.11.1-source-release.zip<http://mirror.gopotato.co.uk/apache//jena/source/jena-2.11.1-source-release.zip> but it doesn't seem to be this simple and I'm copying source files around trying to get it to compile. What are the broad steps I need to follow, and what elements of the Eclipse IDE do I need to learn to do this? I know exactly what I want to do and I've an interesting data integration project to complete and it is frustrating me that I'm banging my head on Eclipse instead of getting on with it ... Best Regards, Richard
