Indeed hardcoding the path to the URE is a bug in the extension, not in LibreOffice.
That Ubuntus LibreOffice resides in proper https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard directories and not in /opt is not an Ubuntu invention, but comes from Debian. Also ~every other Linux distro does the same -- its fundamentally the right thing to do. Two free hints from IRC to forward to Deutsche Post when asking them to fix this issue: Generic hint on setup: 09:47:49 @sberg | Sweetshark, re <https://forum.ubuntuusers.de/topic/e-porto-add-in-libreoffice-5-1-6-2-kein-login-/>: tl;dr; is the problem that they've got their own Java-based UNO-using process? Then they should use that "simple bootstrap" stuff (<https://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Java/Transparent_Use_of_Office_UNO_Components>) or at least use 'unoinfo java' (for which they need to know how to find a LO installation's Or use preexisting solutions to this problem: 09:33:24 @thorsten | Sweetshark sberg: bubli added that to noa-libre (somewhere in the libo repo on github), IIRC that was the way du jour when we discussed it The latter refers to the custom class loader implementation at e.g.: https://github.com/LibreOffice/noa-libre/blob/master/src/ag/ion/bion/officelayer/util/OfficeLoader.java As such, while getting this setup boilerplate right now is a unreasonable burden on extension developers as of now, there is nothing wrong per se with Ubuntus LibreOffice here. Rather the extension needs to do its setup right. Beyond that, upstream LibreOffice SDK certainly could make this stuff easier. But that can happen upstream _only_ as to allow extensions to be able expend the more simple bootstrapping everywhere (from a specific upstream version onwards). ** Changed in: libreoffice (Ubuntu) Status: Confirmed => Invalid -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to libreoffice in Ubuntu. https://bugs.launchpad.net/bugs/1680336 Title: libreoffice java based extension cannot find java_uno due to wrong java.library.path Status in libreoffice package in Ubuntu: Invalid Bug description: I try to use the "E-Porto Add In" (extension to insert a stamp for the German postal system) from https://www.deutschepost.de/de/i /internetmarke-porto-drucken/e-porto-add-in.html on Ubuntu 16.04 amd64. The extension contains several XCU and one JAR: schlomo@brho:~/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu265944hpbsb.tmp_/loeportoinstaller_v3_0_0.oxt$ ll total 744 drwxrwx--- 8 schlomo schlomo 4096 Apr 5 06:45 ./ drwxrwx--- 3 schlomo schlomo 4096 Apr 5 06:45 ../ drwxrwx--- 4 schlomo schlomo 4096 Apr 5 06:45 assets/ -rw-rw---- 1 schlomo schlomo 1339 Apr 5 06:45 description.xml drwxrwx--- 2 schlomo schlomo 4096 Apr 5 06:45 images/ drwxrwx--- 2 schlomo schlomo 4096 Apr 5 07:01 lib/ drwxrwx--- 2 schlomo schlomo 4096 Apr 5 06:45 licenses/ drwxrwx--- 2 schlomo schlomo 4096 Apr 5 06:45 META-INF/ -rw-rw---- 1 schlomo schlomo 721541 Apr 5 06:45 OOEporto.jar drwxrwx--- 3 schlomo schlomo 4096 Apr 5 06:45 registry/ schlomo@brho:~/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu265944hpbsb.tmp_/loeportoinstaller_v3_0_0.oxt$ cat META-INF/manifest.xml <?xml version="1.0" encoding="UTF-8"?> <manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest"> <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-component;type=Java" manifest:full-path="OOEporto.jar"/> <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data" manifest:full-path="registry/data/org/openoffice/Office/Addons.xcu"/> <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data" manifest:full-path="registry/data/org/openoffice/Office/Jobs.xcu"/> <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data" manifest:full-path="registry/data/org/openoffice/Office/WriterWindowState.xcu"/> <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data" manifest:full-path="registry/data/org/openoffice/Office/ProtocolHandler.xcu"/> </manifest:manifest> Using the extension throws the following Java exception: Exception in thread "Thread-1312" com.sun.star.lang.IllegalArgumentException at com.sun.star.comp.bridgefactory.BridgeFactory.createBridge(BridgeFactory.java:126) at com.sun.star.comp.urlresolver.UrlResolver$_UrlResolver.resolve(UrlResolver.java:107) at com.sun.star.comp.helper.Bootstrap.bootstrap(Bootstrap.java:349) at com.sun.star.comp.helper.Bootstrap.bootstrap(Bootstrap.java:280) at de.deutschepost.ooeporto.comm.a.e(Unknown Source) at de.deutschepost.ooeporto.comm.a.c(Unknown Source) at de.deutschepost.ooeporto.comm.a.a(Unknown Source) at de.deutschepost.ooeporto.comm.a.a(Unknown Source) at de.deutschepost.ooeporto.core.e.c(Unknown Source) at de.deutschepost.ooeporto.core.e.a(Unknown Source) at de.deutschepost.ooeporto.gui.bM.run(Unknown Source) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.sun.star.uno.UnoRuntime.getBridge(UnoRuntime.java:474) at com.sun.star.uno.UnoRuntime.getBridgeByName(UnoRuntime.java:512) at com.sun.star.comp.bridgefactory.BridgeFactory.createBridge(BridgeFactory.java:121) ... 11 more Caused by: java.lang.UnsatisfiedLinkError: no java_uno in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at com.sun.star.lib.uno.environments.remote.NativeThreadPool.<clinit>(NativeThreadPool.java:77) at com.sun.star.lib.uno.environments.remote.ThreadPoolManager.create(ThreadPoolManager.java:46) at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.<init>(java_remote_bridge.java:330) ... 18 more The relevant part is java_uno. With libreoffice --strace I found out that actually it cannot find the libjava_uno.so library. I found a workaround by creating the /usr/lib/libreoffice/program/ooenv file with export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/libreoffice/program/classes:/usr/lib/libreoffice/program in it. This issue has been also discussed on UbuntuUsers.de: https://forum.ubuntuusers.de/topic/e-porto-add-in-libreoffice-5-1-6-2 -kein-login-/ Can you please improve libreoffice / ure so that it will set the library path correctly without user intervention? ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: ure 5.1.6~rc2-0ubuntu1~xenial1 ProcVersionSignature: Ubuntu 4.4.0-71.92-generic 4.4.49 Uname: Linux 4.4.0-71-generic x86_64 ApportVersion: 2.20.1-0ubuntu2.5 Architecture: amd64 CurrentDesktop: Unity Date: Wed Apr 5 08:12:47 2017 InstallationDate: Installed on 2016-05-01 (338 days ago) InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1) SourcePackage: libreoffice UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1680336/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp