Apache OpenOffice (AOO) Bugzilla – Issue 53440
Bootstrap.defaultBootstrap_InitialComponentContext in stand-alone Java application
Last modified: 2017-05-20 11:31:26 UTC
Using com.sun.star.comp.helper.Bootstrap.defaultBootstrap_InitialComponentContext from a Java application when the juh dynamic library cannot be found (e.g., is not available via Unix LD_LIBRARY_PATH or Windows PATH) leads to a "java.lang.UnsatisfiedLinkError: no juh in java.library.path". Necessary steps: - Change the System.loadLibrary("juh") in juh/com/sun/star/comp/helper/Bootstrap.java 1.12 to NativeLibraryLoader.loadLibrary. - Extend the manifest Class-Path of juh.jar to find the juh dynamic library ("../../lib" for Unix URE, "../bin" for Windows URE, and ".." for OOo which is not strictly necessary as NativeLibraryLoader automatically finds this). - The juh dynamic library needs to find the dynamic libraries it depends on, esp. juhx, which is a problem esp. on Windows.
Created attachment 28846 [details] Changes to SRC680m124 CVS module ure to reproduce this issue
.
A second problem, discovered on SRC680m160, is that when the juh dynamic library *is* found, defaultBootstrap_InitialComponentContext still does not work if java_uno.jar is not found by the classloader that loaded the code that calls defaultBootstrap_InitialComponentContext: default_Bootstrap_InitialComponentContext indirectly calls loadExternalMapping in cppu/source/uno/lbmap.cxx, which calls uno_ext_getMapping in bridges/source/jni_uno/jni_bridge.cxx, which catches a BridgeRuntimeError "java.lang.ClassNotFoundException: com.sun.star.bridges.jni_uno.JNI_info_holder". (See the TODO about java_uno.jar in ridljar/source/unoloader/com/sun/star/lib/unoloader/UnoClassLoader.jar:1.4 l. 79.)
Reset assigne to the default "issues@openoffice.apache.org".