RES: Problem Trying call LibreOffice from Java

Fernando Digitaldoc fernando at digitaldoc.com.br
Wed May 8 16:35:23 PDT 2013


Hi Stepahn,
We will make another example. (have some problems with officebean.dll and
officebean.so .. , we are solving for the example)
But now , we are trying to make more tests.

The most critical issue now is the call from Ubuntu.
KDE on Windows or Linux, we can run, but in Ubuntu, after calling the main
screen soffice when we execute the call:

"aBean.startOOoConnection (" uno: socket, host = 127.0.0.1, port = 8100;
urp; StarOffice.ServiceManager ");"

He says that the libreoffice.so not find or run libjawt.so
" java.lang.UnsatisfiedLinkError: 
/home/gha/myapp/lib/libofficebean.so: libjawt.so: cannot open shared object
file: No such file or directory"

"/home/gha/myapp/lib/libofficebean.so " - is path were we download that lib
and load that in the applet..

What I can try to solve UnsatisfiedLinkError ?

Fernando Gomes | Gerente de Desenvolvimento | Coordenador de Produtos
Skype: fernando.digitaldoc
Twitter: fhgomes_ti

-----Mensagem original-----
De: Stephan Bergmann [mailto:sbergman at redhat.com] 
Enviada em: terça-feira, 7 de maio de 2013 13:27
Para: Fernando Digitaldoc
Cc: libreoffice at lists.freedesktop.org
Assunto: Re: Problem Trying call LibreOffice from Java

On 05/07/2013 12:12 AM, Fernando Digitaldoc wrote:
> We have a java application that calls the LibreOffice to make creating 
> and editing files.
> That works fine in old 3.2 version when it was a OpenOffice.
>
> Whats wrong in code now?
>
> In Windows says: " UNO_PATH environment variable is not set (required 
> system path to the office program directory)"
>
> And in Linux says:
> Error 1:
> "Could not initialize class com.sun.star.comp.beans.LocalOfficeConnection"
>
> Error 2:
> "Invalid URL connection UNO"
>
> We are running that on one applet, but here we make a simple project 
> with the source.
> We are using WriterEditor.java for tests..
>
> https://dl.dropboxusercontent.com/u/30314039/JavaCallLibreOffice.rar

That rar does not make it obvious what your relevant test code is and how to
build a failing scenario from source.

Stephan



More information about the LibreOffice mailing list