After Sun Inc had been acquired by Oracle ; and because of some clashes between Sun’s open source projects communities and the -somewhat unfriendly- Oracle attitude towards Sun’s open source projects; OpenOffice has been forked to LibreOffice. This Effort is being Led by document foundation probably with joint efforts to come from major Linux companies Like Novel ,Ubuntu and RedHat .
For Java OpenOffice API developers , the move to Libreoffice should be straightforward. the basic idea is just replace OpenOffice installation and sdk with corresponding Libreoffice ones. If you consider doing serious Java Libreoffice extension development it is advised to use an IDE plugin for Libreoffice.
The only two available Libreoffice/openoffice java IDE plugins are OOEclipseIntegration and Netbeans 6.8 OpenOffice.org API Plugin . While the eclipse OO plugin is available in eclipse marketplace repos from eclipse IDE (3.6+) and is still undergoing active development; It seems the netbeans OO plugin doesn’t get upgraded into higher netbeans versions anymore. So you are stuck using the old netbeans version 6.8.
To set up your Netbeans OpenOffice.org development environment with Libreoffice do the following steps:
- Get netbeans IDE 6.8 and then install plugin “OpenOffice.org API Plugin” from netbeans IDE plugins dialog.
- Downlaod and Install Libreoffice and Libreoffice SDK.
- In Netbeans IDE select “Tools->Options->Miscellaneous”. select Tab “OOo API Plugin”. then in fields “Openoffice.org installation” and “Openoffice.org SDK installation” browse to the folder where you installed Libreoffice and libreoffice SDK respectively as described in image below:
When you create a new Project for OpenOffice.org API the currently specified Libreoffice sdk library will be automatically added to your Netbeans OpenOffice Project classpath (for example Libreoffice 3.4 library )
For a Detailed tutorial on java netbeans OpenOffice API development refer to Kay Kroll on Netbeans OpenOffice integration . I have also included a presentation by jurgen Shmidt included in the ‘Additional Resources’ section at the bottom of this post. These two tutorials although for OpenOffice.org they also apply to Libreoffice java development in Netbeans as the same process applies for both OpenOffice and LibreOffice.
For people using linux (specifically opensuse 12.+) upgrading to Libreoffice version 3.5+ causes some issues. In netbeans 6.8 IDE the automatically added library ‘LibreOffice 3.5 or 3.6’ to the project classpath misses other important jars for some unknown reasons. I had to manually add the following jars from the directory ‘Your_LO_Home/ure/share/java’ :
juh.jar jurt.jar ridl.jar unoloader.jar
For some unkown reason the netbeans library LibreOffice 3.5 doesn’t contains these jars and i had to add them manually to project classpath.
Another issue with netbeans OO plugin and LO sdk 3.5+ is when you clean and build your OO project and try ‘debug extension in OO Target’ there is a wiered error massage stating:
‘user doesn’t have write permission to install this extension’.
you simply overcome this error message by running again the ‘debug extension in OO Target’.
- Netbeans OpenOffice integration .
- Browse this blog’s OpenOffice API Posts.
OpenOffice.org Extensions development in Java with NetBeans