[Libreoffice-bugs] [Bug 127557] New: Cannot use the UNO jars to connect to Libre Office from a modularized java 11 project

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Sep 15 13:58:23 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=127557

            Bug ID: 127557
           Summary: Cannot use the UNO jars to connect to Libre Office
                    from a modularized java 11 project
           Product: LibreOffice
           Version: 6.3.1.2 release
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: sdk
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: cschwentker at gmail.com

Description:
When trying to connect to LibreOffice from a modularized (jigsaw) java 11
application, it is not possible to connect to Libre Office because the jars are
included as dependencies on the module path.
It will result in "no office executable found!". Known problem.

Trying to load the jars dynamically e.g like this way,
https://stackoverflow.com/a/48323948 it will result in an  exception, because
the jars are a) on the module path already and b) in the unnamed module.

The workaround was to "hack" the Bootstrap to accept an URLClassLoader and to
use sockets instead of pipe.
UrlClassLoader as parameter fixed the instantiation of the Boostrap,but then it
complained about jpipe not on the library path. Even putting it on the PATH
doesn't work either.



https://github.com/JabRef/jabref/blob/master/src/main/java/org/jabref/gui/openoffice/Bootstrap.java

Note that to include the jars in the module path also refers to Bug 117331













Steps to Reproduce:
1. Try to connect from a modularized java 11 application
2. Create a single jar out of the libs, put in module path
3. Try to load jars from LO program folder dynamically.


Actual Results:
You will encounter an exception

Expected Results:
Creating a successful connection.


Reproducible: Always


User Profile Reset: No



Additional Info:

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190915/49152b1d/attachment.html>


More information about the Libreoffice-bugs mailing list