Issue 53440

Summary: Bootstrap.defaultBootstrap_InitialComponentContext in stand-alone Java application
Product: udk Reporter: Stephan Bergmann <stephan.bergmann.secondary>
Component: codeAssignee: AOO issues mailing list <issues>
Status: ACCEPTED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: 680m124   
Target Milestone: AOO PleaseHelp   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Changes to SRC680m124 CVS module ure to reproduce this issue none

Description Stephan Bergmann 2005-08-17 09:44:47 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.
Comment 1 Stephan Bergmann 2005-08-17 09:52:23 UTC
Created attachment 28846 [details]
Changes to SRC680m124 CVS module ure to reproduce this issue
Comment 2 Stephan Bergmann 2005-08-17 09:53:05 UTC
.
Comment 3 Stephan Bergmann 2006-03-28 12:39:13 UTC
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.)
Comment 4 Marcus 2017-05-20 11:31:26 UTC
Reset assigne to the default "issues@openoffice.apache.org".