Embedding

The archive file can extend a Prolog system for application use. In most cases the top-level methods from the previous sections also work for application embedding. But it could be that the extension capability needs to be accessed at compile time. It is then necessary to add the archive file to the class path during compilation:

    javac –cp interpreter.jar;module.jar;. <main>.java # on windows
    javac –cp interpreter.jar:module.jar:. <main>.java # on linux and mac

The only Java programming object that is visible for the Jekejeke Minlog module is the class CapabilityMinlog. Currently this class does not export some constants or functions. It might be only useful for use in administration functions of the runtime library. When you want to execute your application that has been compiled with the Jekejeke Minlog module, you might use the following command line:

    java –cp interpreter.jar;module.jar;. <main>   # on windows
    java –cp interpreter.jar:module.jar:. <main>   # on linux and mac

For a recommendation on additional command line options see the runtime library installation document. Alternatively you can use an integrated development environment to compile and execute your Java class. All you probably have to do is create an appropriate project and then register all the archive files in the class path of the project.

You might also unpack the Jekejeke Minlog capability and include it in a .jar together with your compiled byte code and then execute this .jar.

Further you might want to deploy the Jekejeke Minlog capability together with your applets or servlets. In the case of applets this will not work, since we currently do not provide a mecha-nism to access profile data remotely and therefor the license will not be found. In case of servlets all you need to do is copy the archive file into the WEB-INF/lib directory. If the license has been activated on the server, for example by using the top level and the –e option from a shell, the Jekejeke Minlog capability should work.

Kommentare