</pre>
In case you want to extend BaseX with a java libraryJava archive, some additional requirements have to be fulfilled:
* # Apart from the package descriptor <code>expath-pkg.xml</code> the package has to contain at its root a descriptor defining the included jars and the binary names of the public classes from them. It has to be named <code>basex.xml</code> and has to have the following structure:
<pre class="brush:xml">
</pre>
* # The jar file itself along with an XQuery file defining wrapper functions around the java methods has to reside in the module directory. The following example illustrates how java methods are wrapped with XQuery functions:
'''Example:'''<br>Suppose we have a simple class <code>Printer</code> having just one public method <code>print()</code>: