How to create a OOo Java Extension using Eclipse as IDE
Recently, I tried to create an OpenOffice.org Extension (.oxt) with Java. I’m using Eclipse as Java IDE for all my projects, so I wanted to use Eclipse for this task as well.
There is an Eclipse plugin to help you with this task, but there are come caveats. The old versions of this plugin do not work with the current OpenOffice.org version (3.0+).
You will probably get an error message when trying to specify the SDK (“SDK version has to be at least 2.0.4″) or the OOo location (“Invalid OOo path”) in the plugin.
Eventually, after some time searching the web, I found a working solution! There is a tutorial about this issue at the OpenOffice.org Wiki:
Unfortunately, the mentioned Eclipse plugin update site link does not exist anymore and the mentioned CVS version of the plugin does not work with OpenOffice.org 3.0.
After searching the web, I found the new GIT Source Repository of the Eclipse plugin here:
It is administrated by Cédric Bosdonnat <cedricbosdo [AT] openoffice [DOT] org>, the author of the ooeclipse plugin.
Working Eclipse plugin update site
Because I could not find an Eclipse update site hosting this version of the plugin, I’ve taken the source and created a plugin update site with the most current version of the plugin on my own:
Do not try to download the plugin from this URL with your internet browser. This will not work!
Instead, Eclipse will do it for you when you do the following steps:
In Eclipse, select Help > Software updates > Available software > Add Site and enter the mentioned URL.
Below the new site, select OpenOffice.org, click on Install and follow the instructions on your screen.
After you’ve installed the plugin, follow the Tutorial from the OOo Wiki to create your first HelloWorld extension:
I will try to keep the update site up-to-date.
Cédric’s page seems to be working again:
You may probably use one of his plugin update sites, again:
- http://cedric.bosdonnat.free.fr/ooeclipseintegration (stable, but maybe old)
- http://cedric.bosdonnat.free.fr/ooeclipseintegration-dev (dev version)
If you want to compile the plugin on your own, here are are the necessary steps:
How to build from source
- Check-out the source from the repository:
- git clone git://anongit.freedesktop.org/git/ooo-build/contrib/ooeclipse ooeclipse
- Change to the new directory:
- cd ooeclipse
- Build the plugin:
- ant -Dopenoffice.home=/usr/lib/openoffice -Declipse.home=/opt/eclipse -f build/build.xml
- (adjust the two properties according to your setup)