Components of an extension (.oxt)

From a user perspective extensions are really easy to handle: Download the extension as one single .oxt file, start any application of the suite, go to the extension manager, load the .oxt file, accept the license agreement if available and you are done.

For developers there are quite a few components to prepare before you can create the .oxt file. To see what is needed let me show you the contents of the Jitenize extension file.

Like .jar files the .oxt files are actually archives in ZIP file format and can be opened and generated with every archive tool that can handle ZIP files, so let’s have a look at the Jitenize extension using the jar command line tool:

> jar tf jitenize_0.8.3.en.oxt

The central information that tells an application how to load an extension is in the manifest.xml file:

<?xml version="1.0" encoding="UTF-8"?>
 <manifest:file-entry manifest:full-path="types.rdb" manifest:media-type="application/;type=RDB"/>
 <manifest:file-entry manifest:full-path="jitenize.jar" manifest:media-type="application/;type=Java"/>
 <manifest:file-entry manifest:full-path="Jitenize/" manifest:media-type="application/"/>
 <manifest:file-entry manifest:full-path="jitenize.xcu" manifest:media-type="application/" />

jiteninze.jar and types.rdb contain the main code of the extension written as an UNO service in Java. More on this in a later post.

The Jitenize subdirectory contains the user interface written in BASIC that call the UNO service. The files were generated by writing a macro library in Writer and exporting it as a BASIC library (and not as an extension!).

jitenize.xcu contains the information how to extend the menu structure of Writer and how to connect the menu items to the BASIC macros. The easiest way that I found to create this file is to use the macro contained in chapter 2.2 of this document. Btw. addon is an old name for what is nowadays called extension, the document is quite outdated, but the macro still works well.

In addition to these four central files a few other files are available:

dict_en.sqlite, sqljet-1.0.7.jar and  antlr-runtime-3.1.3.jar contain the dictionary database and the free sqlite database engine written in Java from TMate Software. The engine is used by the UNO service to whom it is made available by adding the jar files to the classpath defined in the manifest of jitenize.jar.

Finally description.xml contains information about the extension that show up in the extension manager (display name, version, etc.), links to the license file COPYRIGHT and an identifier for the extension that must be worldwide unique (com. fuyosoft.jitenize). The Extension manager uses this identifier to decide whether a newly loaded extension is an update to an already existing extension or not.

<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="" xmlns:d="" xmlns:xlink="">
 <identifier value="com.fuyosoft.jitenize" />
 <version value="0.8.3.en" />
  < value="2.2" name=" 2.2"/>
  <name xlink:href=""></name>
  <simple-license accept-by="admin" suppress-on-update="true" >
   <license-text xlink:href="COPYRIGHTS"/>

Leave a Reply

Your email address will not be published. Required fields are marked *