How to use Libreoffice SDK from Java

asked 2018-04-12 14:28:52 +0200

Keerthi gravatar image

We have installed Libreoffice SDK 5.0.6.3 in our linux machine(Red Hat Enterprise Linux Server release 5.11 (Tikanga)). We are not sure on further steps to follow.

As per reference https://api.libreoffice.org/docs/inst..., we need to do some configuration steps using setsdkenv_unix.sh.

But we are unable to find the given file, while other files with name following names( setsdkenv_unix.sh.in and setsdkenv_unix) are present, under dir /opt/libreoffice5.0/sdk

Is it necessary, to do configuration settings using script, or it is implicitly done, during SDK installation. Also, how can we check, whether SDK has been properly installed, and ready for Java development.

Note: As per reference we are missing following: GNU 3.7.9 zip too 2.3

Are they mandatory for development.

edit retag flag offensive close merge delete

Comments

How did you install the SDK? Installing it from the repository on Fedora 27, setsdkenv_unix.sh is in /usr/lib64/libreoffice/sdk, as indicated in the repo's info about libreoffice-sdk.

techsquirrel gravatar imagetechsquirrel ( 2018-05-16 18:06:48 +0200 )edit

Also, you may not need the setsdkenv_unix.sh script (although its missing suggests to me that something's not completely installed). Setting up and using LO SDK from Java in Eclipse on Fedora 27, I didn't actually need to run setsdkenv_unix.sh.

techsquirrel gravatar imagetechsquirrel ( 2018-05-16 18:11:35 +0200 )edit

Probably the best way to check that everything is ready for development is to connect to LibreOffice with Java, as with the FirstUnoContact class referred to at https://wiki.openoffice.org/wiki/Docu....

techsquirrel gravatar imagetechsquirrel ( 2018-05-17 13:39:11 +0200 )edit

As noted on the page you referenced, "GNU make is used to build the examples of the SDK." "GNU make" shouldn't be needed unless you need to put together something with a Makefile. For example, /usr/lib64/libreoffice/sdk/examples/java/Spreadsheet (or somewhere analogous in your installation) contains a number of example Java classes using the SDK along with a Makefile that's used by make to build the examples before they can be run.

techsquirrel gravatar imagetechsquirrel ( 2018-05-17 14:08:28 +0200 )edit

Zip shouldn't be needed unless or until you get to where you want to generate UNO Packages, like .oxt files. You can always install Zip and make later if they become necessary.

techsquirrel gravatar imagetechsquirrel ( 2018-05-17 14:18:24 +0200 )edit